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 20209.1213026552@sss.pgh.pa.us
Whole thread Raw
In response to 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
Re: Strange issue with GiST index scan taking far too long
List pgsql-hackers
Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> writes:
> So by adding in an extra function around the subselect result, we have 
> speeded up the index lookup by several orders of magnitude, and the 
> speedup appears to be coming from somewhere within the index scan?!

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.

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: pg_dump restore time and Foreign Keys
Next
From: Mark Cave-Ayland
Date:
Subject: Re: Strange issue with GiST index scan taking far too long