Opened 19 years ago

Last modified 16 years ago

#959 closed enhancement

Add lco to PostgreSQL driver to have indexes created — at Version 4

Reported by: bartvde@… Owned by: warmerdam
Priority: low Milestone: 1.6.0
Component: OGR_SF Version: unspecified
Severity: minor Keywords: PostgreSQL GiST "spatial index"
Cc: Markus Neteler, Mateusz Łoskot

Description (last modified by Mateusz Łoskot)

It would be nice if there would be a layer create option on the PostgreSQL driver to have indexes created automatically.

I would suggest the following indexes:

CREATE INDEX [tablename]_geom_idx
  ON [schema].[tablename]
  USING gist
  (wkb_geometry);

CREATE INDEX [tablename]_oid_idx
  ON [schema].[tablename]
  USING btree
  (oid);

CREATE INDEX [tablename]_ogc_fid_idx
  ON [schema].[tablename]
  USING btree
  (ogc_fid);

And after this do a VACUUM ANALYZE;

Change History (2)

comment:3 by hobu, 17 years ago

Description: modified (diff)
Milestone: 1.5.0

This might be nice for 1.5 if there ends up being a bunch of other PG-related stuff going on this release.

comment:4 by Mateusz Łoskot, 17 years ago

Cc: Mateusz Łoskot added
Description: modified (diff)
Keywords: GiST "spatial index" added
Note: See TracTickets for help on using tickets.