I would need double check if overlaps uses an index. 

If it does you can use explain to figure out which table is being fill y 
scanned and adjust the order in the statement accordingly. 

If it doesn't, then you can use something that does (e.g. &&) and ensure that 
the smaller table is the one being scanned.


On July 15, 2016 9:15:55 AM EDT, Richard McDonnell <richard.mcdonn...@opw.ie> 
>Need a little help, this may not be the forum, but I thought I would 
>throw it out there!
>I am looking to minimise the search area in this query
>SELECT objectid
>level_1_20151206 AS A, water_polygon AS Z
>(SELECT ST_Overlaps (A.the_geom, Z.geom));
>What I want to do is use the extent of A's geometry to limit the search
>for overlaps with Z if that makes sense!?
>These are both large National coverage datasets.
>Any help suggestions welcomed!!
>OPW - Ag féachaint don am atá le teacht - Ag caomhnú ón am atá thart
>OPW - Looking to the future - Caring for the past
>Email Disclaimer: http://www.opw.ie/en/disclaimer/
>Qgis-user mailing list
>List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Sent from my Android device with K-9 Mail. Please excuse my brevity.
Qgis-user mailing list
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to