<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list -</p>
<p>I have created a virtual layer using Python and shown this in my
QGIS mapping window like this:</p>
<p><font face="monospace">layer = QgsVectorlayer(?layer=<i>...layer
"ref" definition... </i>&layer=<i>... "cur" definition...</i>&query=select
ref.* from ref left join cur on ref."objekt-id" =
cur."objekt-id" where cur."objekt-id" is NULL,"My layer",
"virtual")</font><code><br>
</code></p>
<p>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).</p>
<p>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. <br>
</p>
<p>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 ??? <br>
</p>
--
<pre class="moz-signature" cols="72">Med venlig hilsen / Kind regards
Bo Victor Thomsen</pre>
</body>
</html>