<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>