[postgis-users] oid indexes issue

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Nov 24 06:38:04 PST 2006


> Thanks for the info.  So should one still invoke BOTH of the following
> index creations:
>
> # CREATE INDEX service_endpoints_idx ON service_endpoints USING GIST (
> the_geom GIST_GEOMETRY_OPS );
> # CREATE INDEX service_endpoints_idx_oid ON service_endpoints (
> some_other_id );
>
> Or just the first one?
>
> ..Tom


Hi Tom,

Just the first one will suffix. The index on oid is only needed if your
tables contain an oid column and your application issues SQL in the form
"SELECT * FROM service_endpoints WHERE oid = x". Note that Mapserver is
one popular application which does attempt to reference oids by default,
however you can override this behaviour by adding a "USING UNIQUE
<fieldname>" clause to the DATA statement in the mapfile (see the
Mapserver docs for more info).


HTH,

Mark.





More information about the postgis-users mailing list