Re: Index scans when bitmap scans disabled - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Index scans when bitmap scans disabled
Date
Msg-id 19859.1145848343@sss.pgh.pa.us
Whole thread Raw
In response to Index scans when bitmap scans disabled  (Michael Fuhr <mike@fuhr.org>)
Responses Re: Index scans when bitmap scans disabled  (Michael Fuhr <mike@fuhr.org>)
List pgsql-hackers
Michael Fuhr <mike@fuhr.org> writes:
> Is it expected that the planner in 8.1.3 (CVS) and HEAD doesn't use
> an index scan for the second query below when bitmap scans are
> disabled?

You mean this one?

> test=> EXPLAIN SELECT * FROM foo WHERE id IN (1, 2);

That's not an indexable condition, ie, in general it can't be satisfied
with a single probe of the index.

> Here's the same query in 8.0.7:

>  Index Scan using foo_pkey, foo_pkey on foo  (cost=0.00..6.03 rows=2 width=4)
>    Index Cond: ((id = 1) OR (id = 2))

We removed the repeated-indexscan plan type in favor of bitmap scans.
I'm not immediately aware of any reason why we shouldn't have ... if
there is any case where the pre-8.1 plan style wins, it'd have to be
a pretty narrow scenario.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: Unresolved Win32 bug reports
Next
From: Michael Fuhr
Date:
Subject: Re: Index scans when bitmap scans disabled