Re: Strange issue with GiST index scan taking far too long - Mailing list pgsql-hackers

From Mark Cave-Ayland
Subject Re: Strange issue with GiST index scan taking far too long
Date
Msg-id 484D535E.5020000@siriusit.co.uk
Whole thread Raw
In response to Re: Strange issue with GiST index scan taking far too long  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Strange issue with GiST index scan taking far too long  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> Is the value you are fetching from the geography table large enough to
> be toasted?  I'm thinking you might be looking at the cost of repeated
> de-toastings.

Yeah, it's a fairly large geometry field so it will definitely be 
getting toasted. So is it a case of with the mcatest function in place, 
we're effectively caching the de-TOASTED value?

> BTW, that mcatest function is buggy --- it's not copying the last
> 4 bytes of the source value.  I don't know enough about PostGIS
> data types to know what effect that would have.

It would probably lose that last point in the coordinate sequence, but 
nothing major. I've removed the -VARHDRSZ part just to check and it 
doesn't make any difference.


Many thanks,

Mark.

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange issue with GiST index scan taking far too long
Next
From: Tom Lane
Date:
Subject: Re: pg_dump restore time and Foreign Keys