[postgis-devel] Leaky: ST_Contains(g,g,i)
Paul Ramsey
pramsey at cleverelephant.ca
Thu Apr 3 08:24:04 PDT 2008
I happened to leave my computer on overnight, with that database
connection still intact, so I ran the same query on the same
connection and the timings are still in the high range...
Time: 6914.993 ms
Time: 7024.927 ms
Time: 7191.417 ms
Time: 6985.617 ms
Drop and re-connect to the database, and they go back down again
Time: 6246.464 ms
Time: 6191.420 ms
Time: 6272.710 ms
Very odd. Well, not very. I just confirmed my suspicion and watched
the top while running the command. It leaks about 2M of memory on each
run. Disconnect and the backend goes away, start from scratch again.
On Thu, Apr 3, 2008 at 7:11 AM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
>
> 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
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
More information about the postgis-devel
mailing list