[Qgis-user] Selection issue for large set of features
    Yves Moisan 
    ymoisan at videotron.ca
       
    Thu Dec 10 07:23:16 PST 2015
    
    
  
> why does the featureId not point to the PK? Can you guarantee that the 
> value is unique in the view? Maybe it is not?
Hi Bernhard,
I'll double check that.
> Another thought: I normally use QgsVectorLayer.setSubsetString() to 
> reduce the amount of features being loaded into QGIS in the first 
> place (and by using the subsetString I let PG deal with it). Thus I 
> can use plain SQL and do not have to fuzz with QgsFeatureRequest.
When I'm sure it's not a DB problem, I'll probably resort to building 
the QgsDataSourceURI object first and then build the layer with that 
object, as shown at 
http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html 
(plus a uri.setKeyColumn(my_pk) call).
Thanx !
Yves
    
    
More information about the Qgis-user
mailing list