On Wed, Apr 8, 2009 at 10:33 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Apr 8, 2009 at 1:17 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> And please note that we think bitmap scans are the larger part of
>>> the win anyway. What's left undone there is some marginal mopup.
>
>> Can you elaborate on this? I'm fuzzy on why index scans can't benefit
>> from this as much as bitmap index scans.
>
> The main point is that the planner will prefer a bitmap scan for any
> query that's estimated to return more than quite a small number of rows.
> (In my experience the cutover point is in the single digits.) So
> there's just not that much room to win for plain indexscans. Their
> principal application is really for fetching single rows, a case where
> prefetch is entirely useless because you have nothing to overlap.
That makes sense, but what about the nestloop-over-inner-indexscan case?
...Robert