2

I've created a spatialite database with 1,600,000 rows with an index on one of the fields, when I query the indexed text field using the spatialite GUI the response is almost instant. If I load the database into QGIS (2.8.3) and query the same field using select by expression the query takes 20 seconds to complete so it appears QGIS isn't using the index.

Does anyone have any ideas as to how I can improve performance of the query in QGIS?

1

Upgrade to >= 2.14. in older versions QGIS would have to loop through all features in the layer when selecting by expression, but newer versions delegate this to the database and can take advantage of this index.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.