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

From Tom Lane
Subject Re: Strange issue with GiST index scan taking far too long
Date
Msg-id 20497.1213027426@sss.pgh.pa.us
Whole thread Raw
In response to Re: Strange issue with GiST index scan taking far too long  (Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>)
Responses Re: Strange issue with GiST index scan taking far too long
List pgsql-hackers
Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> writes:
> 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?

Well, yeah, because the first thing it does is pg_detoast_datum.
Just as a cross-check, try changing it to copy the value without
forcibly detoasting --- I'll bet it's still slow then.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump restore time and Foreign Keys
Next
From: "Filip Rembiałkowski"
Date:
Subject: Re: pg_dump restore time and Foreign Keys