Re: 'Index Full Scan' for Index Scan without Index Cond - Mailing list pgsql-patches

From Tom Lane
Subject Re: 'Index Full Scan' for Index Scan without Index Cond
Date
Msg-id 17609.1149607609@sss.pgh.pa.us
Whole thread Raw
In response to Re: 'Index Full Scan' for Index Scan without Index Cond  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-patches
Simon Riggs <simon@2ndquadrant.com> writes:
> On Tue, 2006-06-06 at 10:31 -0400, Tom Lane wrote:
>> This discussion is also overlooking
>> the possibility that a partial index is being used for its predicate

> Assuming its possible, of course.

Sure:

regression=# create index tenk1p on tenk1(unique1) where unique2 % 100 = 0;
CREATE INDEX
regression=# explain select * from tenk1 where unique2 % 100 = 0;
                              QUERY PLAN
----------------------------------------------------------------------
 Bitmap Heap Scan on tenk1  (cost=2.10..139.14 rows=50 width=244)
   Recheck Cond: ((unique2 % 100) = 0)
   ->  Bitmap Index Scan on tenk1p  (cost=0.00..2.10 rows=50 width=0)
(3 rows)


            regards, tom lane

pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: 'Index Full Scan' for Index Scan without Index Cond
Next
From: Simon Riggs
Date:
Subject: Re: Why do we have a WAL record for CLOG page extension?