Ticket #1474 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

PostGIS fetches 1 at a time

Reported by: pramsey@refractions.net Assigned to: mloskot
Priority: highest Milestone: 1.4.1
Component: OGR_SF Version: 1.4.0
Severity: normal Keywords:
Cc:

Description (Last modified by mloskot)

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

03/01/07 11:44:16 changed by warmerdam

Reassign to Mateusz

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

03/04/07 03:06:39 changed by mloskot

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.

03/04/07 23:51:17 changed by warmerdam

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. 

03/05/07 00:32:01 changed by mloskot

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.

03/25/07 20:41:47 changed by hobu

  • description changed.
  • milestone set to 1.4.1.

04/08/07 10:44:33 changed by mloskot

  • description changed.