[Qgis-user] PostGIS Queries

James Keener jim at jimkeener.com
Fri Jul 15 06:30:00 PDT 2016


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.

Jim

On July 15, 2016 9:15:55 AM EDT, Richard McDonnell <richard.mcdonnell at opw.ie> wrote:
>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
>FROM
>level_1_20151206 AS A, water_polygon AS Z
>WHERE
>(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!!
>
>Regards,
>
>Richard.
>
>
>
>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
>Qgis-user at lists.osgeo.org
>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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160715/af2fa732/attachment.html>


More information about the Qgis-user mailing list