On Dec 5, 2008, at 5:19 PM, Obe, Regina wrote:
What does ST_Intersects + ST_Relate give you and timing.
That's the one I was interested in if that is faster than
&& + ST_Relate
In theory those 2 should give you the same answer.
Yes, I get the same features returned, but it's slower, as I expected:
large area: 15448 polys, 7924.840 ms
About as much slower, but a little better, as the difference between
intersects time and && time - I took some more times to get an
average, and the intersect time was a little faster than my first
timing:
&& average: 380 ms
intersect average: 1100 ms
&& + relate average: 7200 ms
intersect + relate average: 7900 ms
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of
William Kyngesburye
Sent: Fri 12/5/2008 5:34 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] relationship functions not working well
From what I read in the docs, Intersects first checks the bbox, then
does the full intersect test. While && just does a bbox test.
&& + st_relate gives me what I want, && only gets the touch-only
neighboring polys I don't want (and seems to be more rigorous in that
respect than intersects).
Some times - the full database has 625396 polygons (that's all the
SWBD files).
* a 1 degree selection (an island tile)
st_intersects only: 216 polys, 494.855 ms
&& only: 219 polys, 12.765 ms
&& plus st_relate: 207 polys, 189.360 ms
* a 58x13 degree rectangle (many tiles empty - alaska region)
st_intersects only: 15469 polys, 1460.344 ms
&& only: 15479 polys, 379.317 ms
&& plus st_relate: 15448 polys, 7217.592 ms
This agrees with what I said about && doing a bbox test only. And
verifies my guess that larger areas would get real slow.
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
All generalizations are dangerous, even this one.
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users