Re: Bitmap scan is undercosted? - boolean correlation - Mailing list pgsql-performance

From Tom Lane
Subject Re: Bitmap scan is undercosted? - boolean correlation
Date
Msg-id 12766.1512343900@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bitmap scan is undercosted? - boolean correlation  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Bitmap scan is undercosted? - boolean correlation  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
Jeff Janes <jeff.janes@gmail.com> writes:
> On Sat, Dec 2, 2017 at 8:04 PM, Justin Pryzby <pryzby@telsasoft.com> wrote:
>> It thinks there's somewhat-high correlation since it gets a list of x
>> and y values (integer positions by logical and physical sort order) and
>> 90% of the x list (logical value) are the same value ('t'), and the
>> CTIDs are in order on the new index, so 90% of the values are 100%
>> correlated.

> But there is no index involved (except in the case of the functional
> index).  The correlation of table columns to physical order of the table
> doesn't depend on the existence of an index, or the physical order within
> an index.

> But I do see that ties within the logical order of the column values are
> broken to agree with the physical order.  That is wrong, right?  Is there
> any argument that this is desirable?

Uh ... what do you propose doing instead?  We'd have to do something with
ties, and it's not so obvious this way is wrong.

            regards, tom lane


pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: Bitmap scan is undercosted? - boolean correlation
Next
From: Jeff Janes
Date:
Subject: Re: Bitmap scan is undercosted? - boolean correlation