I have a point PostGIS layer (my_layer) which has more than 66000 features. I am getting the features I want but it takes too long. My code is:
resultList =  req = QgsFeatureRequest().setFilterExpression(' "some_field_name" = \'some_value\' ') for feat in my_layer.getFeatures(req): name = feat.attribute("some_other_field") resultList.append(name)
How can I optimize it so that I can get the results quicker?