<div dir="ltr"><div>Hi,</div><div><br></div><div>Did you cut your big polygons with st_subdivide before intersecting them ?</div><div>It usually speeds up queries by several orders of magnitude.</div><div><br></div><div>Nicolas<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 3 Dec 2018 at 18:41, Paul van der Linden <<a href="mailto:paul.doskabouter@gmail.com">paul.doskabouter@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">I indeed know that trick to eliminate an st_intersection, but that comes at the cost of a st_within.</div><div class="gmail_default" style="font-size:small">In the test-case I'm examing now, the st_intersects and st_within both take about 40 seconds and the st_intersection takes about a minute.</div><div class="gmail_default" style="font-size:small">So to eliminate one of the 40 seconds (and in this case even the intersection because st_within is true), a function returning the relation could speed up things<br></div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>