Opened 17 years ago

Last modified 17 years ago

#1474 closed defect (fixed)

PostGIS fetches 1 at a time

Reported by: pramsey@… Owned by: Mateusz Łoskot
Priority: highest Milestone: 1.4.1
Component: OGR_SF Version: 1.4.0
Severity: normal Keywords:
Cc:

Description (last modified by Mateusz Łoskot)

In ogrpglayer.cpp a CURSOR is prepared and features are fetched, but they are only fetched one at a time (#define CURSOR_PAGE 1). This is optimally memory efficient, but very database inefficient. A few hundred or thousand at a time would work better.

Change History (6)

comment:1 by warmerdam, 17 years ago

Reassign to Mateusz

I'd like this fixed in 1.4 branch as well as trunk.

comment:2 by Mateusz Łoskot, 17 years ago

I reviewed this issue and run tests on big datasets (~500K of features), using index or not, etc.
I compared timing logged by PostgreSQL for various CURSOR_PAGE values:
1, 100, 250, 500 and decided to set the value page to 500 tuples.

Detailed changeset:
http://trac.osgeo.org/gdal/changeset/10871

I resolve it as FIXED.

comment:3 by warmerdam, 17 years ago

Mateusz, 

It doesn't seem from this report that the fix was also applied to the
1.4.x branch, but it should be.  Please be specific about where changes
are made in the bug reports. 

comment:4 by Mateusz Łoskot, 17 years ago

Frank,

Yes, I forget to apply it to the 1.4.
I just backported these changes to the branches/1.4, here is the changeset:

http://trac.osgeo.org/gdal/changeset/10874

I'll follow your suggestions.

comment:5 by hobu, 17 years ago

Description: modified (diff)
Milestone: 1.4.1

comment:6 by Mateusz Łoskot, 17 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.