Opened 13 years ago

Last modified 13 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:

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 Changed 13 years ago by warmerdam

Reassign to Mateusz

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

comment:2 Changed 13 years ago by Mateusz Łoskot

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:

I resolve it as FIXED.

comment:3 Changed 13 years ago by warmerdam


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 Changed 13 years ago by Mateusz Łoskot


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

I'll follow your suggestions.

comment:5 Changed 13 years ago by hobu

Description: modified (diff)
Milestone: 1.4.1

comment:6 Changed 13 years ago by Mateusz Łoskot

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