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

Tom Lane tgl at sss.pgh.pa.us
Thu Jun 19 08:47:49 PDT 2008


Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk> writes:
> I'm wondering if it would be possible add an extra field to Datum 

Datum?  No.  Datum has to be a scalar type --- turning it into a
struct would break an impossibly large amount of code, and the
efficiency implications aren't pleasant either.

However, it does seem like a mechanism that's able to handle caching
of detoasting operations might be able to solve your problem too,
if it's got a reasonably flexible notion of what detoasting means.
I'll try to keep your issue in mind while working on that.

Did you see the alternative design sketch at
http://archives.postgresql.org/pgsql-hackers/2008-06/msg00777.php
?  I'm trying to decide which way to pursue.  The second proposal
would have a lot less management overhead, but would not be able
to cache detoast work across queries, which is something that might
be critical for your case.  Or not --- I'm not very clear on the
use pattern you foresee.  Datum certainly wouldn't have a cross-query
lifespan either.

			regards, tom lane



More information about the postgis-devel mailing list