Hi list -

I have created a virtual layer using Python and shown this in my QGIS mapping window like this:

layer = QgsVectorlayer(?layer=/...layer "ref" definition... /&layer=/... "cur" definition.../&query=select ref.* from ref left join cur on ref."objekt-id" = cur."objekt-id" where cur."objekt-id" is NULL,"My layer", "virtual")|
|

i.e a left join between a Postgres layer "cur" and a GeoPackage layer "ref". And it works !!! (Thank you Hugo and whoever that has developed this facility).

However, it is somewhat slow to react, when you ex. are using the "info" tool on the layer. AFAIK, it's not using the indexes in the original layers.

Is there any method (Python or otherwise) to speed up the response of the virtual layer ? For example by adding a temporary spatial index to the resulting virtual layer ?? Some "magical keywords" in the creation parameters for the layer ???

--

Med venlig hilsen / Kind regards

Bo Victor Thomsen

_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to