[postgis-devel] Re: [postgis-users] GIST index speed

Tom Lane tgl at sss.pgh.pa.us
Thu Jun 12 21:14:15 PDT 2008


I wrote:
> I think I might have scared you off a bit too much there.  My impression
> of this problem is that it should be just a few lines of code to fix;
> I'm just not instantly sure of where to put those lines.

After looking around a bit, I thought probably the best place to do the
deed is in ExecIndexEvalRuntimeKeys().  The attached patch is a bit
larger than I'd anticipated because it seems best to look up the
possible toastability of the datatype just once per query, instead of
every time through ExecIndexEvalRuntimeKeys().

The patch passes core and contrib regression tests in CVS HEAD, but
I've not tried it further back.  (I can say that the patch applies
successfully to 8.3 and 8.2 branches, but not 8.1; I didn't look at
what it might take to make it go in 8.1 or before.)

I don't have any test cases that might show performance benefits.
I'd be willing to apply the patch to HEAD on my own authority, but
to get it into existing release branches, I think the PostGIS crowd
will need to make a case to pgsql-hackers that there are significant
performance benefits here.  Hence, please test ...

			regards, tom lane

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 5214 bytes
Desc: early-index-detoast.patch
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080613/857b3daf/attachment.obj>


More information about the postgis-devel mailing list