Re: index-only scans - Mailing list pgsql-hackers

From Robert Haas
Subject Re: index-only scans
Date
Msg-id CA+TgmoZo0ZSFvDw1NSxYo+61rWVAV7JwgWS6A2TbJf3Nt9XkPg@mail.gmail.com
Whole thread Raw
In response to Re: index-only scans  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Fri, Aug 12, 2011 at 4:03 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> On 11.08.2011 23:06, Robert Haas wrote:
>>
>> Comments, testing, review appreciated...
>
> I would've expected this to use an index-only scan:
>
> postgres=# CREATE TABLE foo AS SELECT generate_series(1,100000) AS id;

Ugh.  I think there's something wrong with this test:

+       if (index->amcanreturn && !index->predOK && !index->indexprs)

I think that should probably say something like (ind->indpred == NIL
|| ind->predOK).

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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: VACUUM FULL versus system catalog cache invalidation
Next
From: Heikki Linnakangas
Date:
Subject: Re: Inserting heap tuples in bulk in COPY