On Sat, Oct 27, 2012 at 2:46 PM, Matthias Kuhn <[email protected]> wrote:
>
> Sounds like something worth considering.
> Something else I have been thinking of and what would increase
> performance pretty good in some situations would be to be able to select
> by an expression:
>
> myFeatureSet = provider.select( QgsExpression( 'attr1 = 1 AND attr2 > 5'
> ) )
> while myFeatureSet.nextFeature(myFeature):
>   do interesting stuff...

Yes, this is another feature I have in my mind, something that could
be later added to QgsFeatureRequest. Actually for expressions there
are two choices: expressions for QgsExpression and provider's native
expressions (e.g. SQL supported by PostGIS). The difference is that
the former ones should work for any provider, while the latter ones
only for those with some native expression language - those are likely
to be faster since the expression would be executed in the backend, so
less data transfer and thus faster fetching.

Martin
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to