Re: Index-only quals

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Index-only quals
Date: 2009-08-21 12:13:55
Message-ID: 407d949e0908210513o24812144ncb82df2f3d8b34dc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 21, 2009 at 12:43 PM, Heikki
Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Here is an updated version of my patch to return data from b-tree
> indexes, and use it to satisfy quals.

+ if (!found_clause && useful_pathkeys == NIL && !useful_predicate)
+ ipath->scantype = ST_INDEXSCAN;
+ else
+ {
+ ipath->scantype = 0;
+ if (index->amhasgettuple)
+ ipath->scantype |= ST_INDEXSCAN;
+ if (index->amhasgetbitmap)
+ ipath->scantype |= ST_BITMAPSCAN;
+ }
+

Does this section need to check amhasgettuple for the index-only scan
case as well? It looks like right now if an indexam has amregurgitate
set but not amhasgettuple then weird things could happen.

--
greg
http://mit.edu/~gsstark/resume.pdf

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-08-21 12:24:56 Re: Index-only quals
Previous Message Greg Stark 2009-08-21 11:57:05 Re: Index-only quals