Ticket #1445 (new enhancement)

Opened 2 years ago

Last modified 1 year ago

GetFeature() not implemented efficiently for server based drivers

Reported by: mchapman Assigned to: mchapman
Priority: normal Milestone:
Component: OGR_SF Version: 1.4.0
Severity: minor Keywords:
Cc:

Description (Last modified by mloskot)

The GetFeature() method of all the server based drivers do not implement random access for retrieval by feature id.  Currently the drivers use sequential scans to get data which is slower than expected query times.  The solution os to implement random access cursors.

So far I have implemented this for PG, MySQL, ArcSDE, ODBC and PGeo.  I am also going to fix Oracle and IBM Informix DataBlade.

Change History

03/11/07 08:31:20 changed by mloskot

Martin,

Do I understand this report correctly that GetFeature() for the PG driver has been implemented?

I'm about to submit a TODO report about the PG's GetFeature() interface,
because as I see it isn't implemented in current SVN version:

OGRFeature *OGRPGLayer::GetFeature( long nFeatureId )
{
    /* This should be implemented! */

    return NULL;
}


03/11/07 13:51:11 changed by warmerdam

I would note that GetFeature() is implemented in OGRPGTableLayer, but 
possibly not in OGRPGResultLayer.  It should likely *not* be implemented
in the OGRPGLayer and that stub method should be removed allowing use 
of the base OGRLayer GetFeature() method. 

If it is implemented for OGRPGResultLayer (ExecuteSQL() results) using
the cursor, care should be taken for the case where a particular column
is identified as the FID as opposed to the easier case where the FID
is just the index into the resultset. 

04/02/07 20:55:48 changed by mloskot

  • description changed.

Instead of removing OGRPGLayer::GetFeature?(), it forwards call to its base class (r11184).

The OGRPGResultLayer still needs implementation of GetFeature?().

04/02/07 21:18:14 changed by mloskot

Finally, we've removed the OGRPGLayer::GetFeature?() completely (r11187).