I'm looking for an efficient way to filter my 700.000 features by attribute in PyQGIS. As suggested in this post It looks like using QgsExpression for such a job is a fastest way? Or is there a faster approach? I'm filtering using integers in indexed columns on my database.
Now when it comes to API I've noticed there is a :
for feature in layer.getFeatures(QgsFeatureRequest(QgsExpression.createFieldEqualityExpression('field_name', value))):
do something with feature
Any speed up suggestions? Is using list comprehension with filtering faster way to go about this problem?