[postgis-devel] Updates to GEOS & POSTGIS

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Fri Jan 18 09:56:44 PST 2008


On Fri, 2008-01-18 at 09:26 -0800, Ben Jubb wrote:

> Mark,
> thanks for the comments,
> 
> - I'll change the comment style.. 
> 
> - added the initGEOS() calls, oops..
> 
> - the size calculation: ill try your suggestion for getting
> arg1_length.
> 
> The method I use to check the identity of the first geometry argument
> is troublesome to me.  Right now, I do a memcmp() on the de-toasted
> argument, and the previously stored argument in the cache.  This seems
> like alot of work to me, but I having trouble coming up with a better
> way.  One way that occured to me is to store the toasted data in the
> cache instead, and do the comparison on the compressed data instead.
> But is there a future-proof way to get the uncompressed data for the
> datum?  Looks like I need to rip out the guts of toast_fetch_datum()
> to do it.
> 
> cheers
> b


Hi Ben,

Unfortunately toasted data isn't just compressed - it can represent data
which is held "out of line" of the table in a separate table. You can
see these by looking for table names beginning pg_toast in the catalogs.
So for this reason I don't think you can do what you were hoping :(

Can you confirm using gprof or similar tools that the detoasting is
where the time is being spent? If so, we can have a think about how to
optimise it...


ATB,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-devel mailing list