[postgis-devel] Scary: ST_Contains(g,g,i)

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Apr 3 07:11:25 PDT 2008


On Thursday 03 April 2008 01:22:34 Paul Ramsey wrote:
> Using the unpatched, "good" version of the three-parameter prepared
> ST_Contains, I run this query over and over again. Look at the
> timings:
>
> select e.id, count(*) from ed2000 e, vada2005 v where
> st_contains(e.the_geom, v.centroid, e.gid) group by e.id;
>
> Time: 6328.829 ms
> Time: 6472.695 ms
> Time: 6370.723 ms
> Time: 6373.861 ms
> Time: 6399.704 ms
> Time: 6361.580 ms
> Time: 6453.128 ms
> Time: 6541.874 ms
> Time: 6496.311 ms
> Time: 6636.350 ms
> Time: 6547.330 ms
> Time: 6628.098 ms
> Time: 6727.472 ms
> Time: 6649.304 ms
> Time: 6720.957 ms
> Time: 6592.655 ms
> Time: 6807.148 ms
> Time: 6762.167 ms
> Time: 6879.076 ms
> Time: 6741.102 ms
> Time: 6842.808 ms
> Time: 6792.472 ms
> Time: 6759.431 ms
> Time: 6861.210 ms
> Time: 6927.436 ms
> Time: 6924.721 ms
> Time: 6993.143 ms

Strange. Is this reproducible if you execute a whole set of statements within 
a PLPGSQL loop? What about after dropping and reconnecting to the database?


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063



More information about the postgis-devel mailing list