Re: Index-only scans for GIST

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index-only scans for GIST
Date: 2014-05-29 20:07:35
Message-ID: CA+TgmoZvvU6ChT3dSMX6ksBHO2iCa+5tCTZ2_gKSS_hQEPgs7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, May 25, 2014 at 6:12 AM, Anastasia Lubennikova
<lubennikovaav(at)gmail(dot)com> wrote:
> Hi, hackers!
> There are first results of my work on GSoC project "Index-only scans for
> GIST".

Cool.

> 1. Version of my project code is in forked repository
> https://github.com/lubennikovaav/postgres/tree/indexonlygist2
> Patch is in attachments
> - This version is only for one-column indexes

That's probably a limitation that needs to be fixed before this can be
committed.

> - fetch() method is realized only for box opclass (because it's trivial)

That might not need to be fixed before this can be committed.

> 2. I test Index-only scans with SQL script box_test.sql
> and it works really faster. (results in box_test_out)
>
> I'll be glad to get your feedback about this feature.

Since this is a GSoC project, it would be nice if one of the people
who is knowledgeable about GIST (Heikki, Alexander, etc.) could weigh
in on this before too much time goes by, so that Anastasia can press
forward with this work.

I don't know enough to offer too many substantive comments, but I
think you should remove all of the //-style comments (most of which
are debugging leftovers) and add some more comments describing what
you're actually doing and, more importantly, why.

This comment doesn't appear to make sense:

+ /*
+ * The offset number on tuples on internal pages is unused.
For historical
+ * reasons, it is set 0xffff.
+ */

The reason this doesn't make sense is because the tuple in question is
not on an internal page, or indeed any page at all.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-05-29 20:23:19 Re: Extended Prefetching using Asynchronous IO - proposal and patch
Previous Message Andrew Dunstan 2014-05-29 20:06:29 Re: Odd uuid-ossp behavior on smew and shearwater