Simon Riggs <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to