Ticket #1234 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

MapServer/PostGIS query mechanism should use primary key on a table

Reported by: margottid@… Owned by: refractions
Priority: high Milestone:
Component: PostGIS Interface Version: 4.2
Severity: normal Keywords:
Cc:

Description

After installing PostGIS and importing data from Shapefile, I noticed that CGI 
query/nquery were from 10 to 15 times slower than if I were using shapefiles.

I tried to add many and many indexes on my fields, but solution came from Paul 
Ramsey: adding an oid index.

He also suggested to issue this bug, saying that "the mapserver/postgis query 
mechanism should be upgraded to automatically use the primary key on a table 
if such a key exists."

Daniele

Change History

Changed 7 years ago by mark@…

  • status changed from new to closed
  • resolution set to fixed
MapServer will now attempt to determine if a single primary key is set on a
table, if no "using unique" clause is found.  The OID is only used if no unique
clause is provided, AND no primary key (or a multi-column primary key) is found.
Note: See TracTickets for help on using tickets.