Opened 13 years ago

Closed 5 years ago

#1445 closed enhancement (fixed)

GetFeature() not implemented efficiently for server based drivers

Reported by: mchapman Owned by: mchapman
Priority: normal Milestone:
Component: OGR_SF Version: 1.4.0
Severity: minor Keywords:

Description (last modified by Mateusz Łoskot)

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 (5)

comment:1 Changed 13 years ago by Mateusz Łoskot


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;

comment:2 Changed 13 years ago 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. 

comment:4 Changed 13 years ago by Mateusz Łoskot

Description: modified (diff)

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

The OGRPGResultLayer still needs implementation of GetFeature?().

comment:5 Changed 13 years ago by Mateusz Łoskot

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

comment:6 Changed 5 years ago by Even Rouault

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.