pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Vitaliy Garnashevich <vgarnashevich@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Bitmap scan is undercosted? - boolean correlation
Date: Sun, 03 Dec 2017 18:31:40 -0500
Message-ID: <12766.1512343900@sss.pgh.pa.us> (raw )
In-Reply-To: <CAMkU=1xQs6=fB+W+=3suB0ZeGsNi8ekBqEqXQ8FriTPw5kcuVQ@mail.gmail.com >
References: <73a4936d-2814-dc08-ed0c-978f76f435b0@gmail.com >
<20171201183427.GK18413@telsasoft.com >
<20171201231104.GN18413@telsasoft.com >
<d2b6a335-8c62-4983-3b5b-c8a75cf37d6f@gmail.com >
<CAMkU=1wkjV3CjWE=Cksp_qSZhNbxTOcyc=dDuwhnDzVxGMu6qQ@mail.gmail.com >
<f8edc163-7ebe-cdb8-d068-685355045f24@gmail.com >
<CAMkU=1zGL7UZpaycNH1Zs=K-TuaJx4P5EmP2mZM3DHzy9JinHg@mail.gmail.com >
<18188.1512258290@sss.pgh.pa.us >
<CAMkU=1yKK0M4W+bNc31PZhH15dzPakSmpr6TH9exT8OUZvmg_w@mail.gmail.com >
<20171203040430.GC14008@telsasoft.com >
<CAMkU=1xQs6=fB+W+=3suB0ZeGsNi8ekBqEqXQ8FriTPw5kcuVQ@mail.gmail.com >
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
view thread (6+ messages) latest in thread
Message-ID: <12766.1512343900@sss.pgh.pa.us>
Permalink: ../12766.1512343900@sss.pgh.pa.us/
Also on: postgresql.org/message-id/12766.1512343900@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff.janes@gmail.com, pryzby@telsasoft.com, vgarnashevich@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: Bitmap scan is undercosted? - boolean correlation
In-Reply-To: <12766.1512343900@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox