[Qgis-developer] Oracle provider slow for large datasets - fetches all features every time

Steve Pritchard steve.pritchard at bto.org
Tue Oct 6 09:02:19 PDT 2015

When I open a QGIS project that has a layer using the Oracle provider, the
provider queries for all of the features even though the display area only
contains a few features:

mod("featureRequest"."GEOM".sdo_gtype,100) IN (3,7) AND (protocol_id =

If I zoom in or out on QGIS, or pan the map, again the Oracle provide
queries for all of the features.

This is a problem for me as the layer contains a large number of features
and the database is remote, and thus redrawing the map each time is very

It looks as though QgsFeatureRequest provides filterRect() /* Get the
rectangle from which features will be taken */, however the Oracle provider
doesn't appear to use this.

Could filterRect() be used in conjunction with Oracle's SDO_FILTER(...)
operation to restrict the set of features requested?

Steve Pritchard
British Trust for Ornithology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151006/87b3c3e4/attachment.html>

More information about the Qgis-developer mailing list