I have two layers, one is a grid of circles and the other is all Census Block Groups (CBG) in the state of Florida. I created a Virtual Layer out of this code
SELECT CirclesFlorida.name, group_concat(cbgFl.FIPS)
FROM CirclesFlorida
LEFT JOIN cbgFl ON ST_Intersects(circlesFlorida.geometry, cbgFl.geometry)
GROUP BY circlesflorida.name
The purpose is for each circle to have a data column which lists every CBG that falls in that circle.
Is there a faster way to do this? Maybe DB Manager? Currently the query takes 20 minutes to run and another 5 minutes to just open the attribute table of the Virtual Layer.
_searchframe_in your query! This helped me: https://lists.osgeo.org/pipermail/qgis-developer/2021-May/063582.html – Kay Oct 03 '23 at 10:55