[postgis-devel] Speed differences
Paragon Corporation
lr at pcorp.us
Thu Dec 30 23:39:28 PST 2010
Paul,
What are you using as a query to do your tests?
As far as && goes I'm not seeing much of a difference between the 2 for &&
Playing with a table of multipolygons -- 100316 records.
E.g.
This one:
SELECT p1.*
from par35 As p1 INNER JOIN par35 As p2 ON p1.the_geom && p2.the_geom
WHERE p2.map_id LIKE '0101%'
Returns 7358 rows in 12153, 12464 ms (numbers fluctuate between 12123 and
12502 but I'm not seeing a clear winner).
However doing ST_Intersects the gserialized is clearly slower:
SELECT p1.*
from par35 As p1 INNER JOIN par35 As p2 ON ST_Intersects(p1.the_geom,
p2.the_geom)
WHERE p2.map_id LIKE '0101%';
Returns in 749 ms on non-gserialized (4697 records)
On gserialized - takes 1841 ms (4697 records).
Though its not quite a fair test since non-gserialized I'm running on a 9.1
alpha1. I setup another 9.0 to test to be fair.
Anyrate I'm adding to the garden test && tests after gist index vaccuum to
get a more objective timing by geometry type.
Thanks,
Regina
More information about the postgis-devel
mailing list