Re: new correlation metric - Mailing list pgsql-hackers

From Tom Lane
Subject Re: new correlation metric
Date
Msg-id 23891.1225138373@sss.pgh.pa.us
Whole thread Raw
In response to Re: new correlation metric  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
List pgsql-hackers
Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:
> Tom Lane wrote:
>> By definition, a bitmap scan's cost isn't affected by index order
>> correlation.

> No?   I think I understand that for index scans the correlation
> influenced how many data pages are estimated to get sucked in.

No, it's not about that, it's about whether we're likely to have to read
any of those pages more than once.  The bitmap processing implicitly
sorts all the tuples-to-be-read into physical TID order, so the heap
access is always linear no matter how badly correlated the index is.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CREATE TABLE AS WITH NO DATA
Next
From: "A. Kretschmer"
Date:
Subject: Re: Website request -- developer docs along with release docs