public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Ron Johnson <[email protected]>
Cc: PostgreSQL mailing lists <[email protected]>
Subject: Re: BTREE index: field ordering
Date: Fri, 28 Mar 2025 10:02:29 -0700
Message-ID: <CAKFQuwZKD=6PQyuC-_Krw8qOESYNhOC+ZNDQYYgqC5402kY0nA@mail.gmail.com> (raw)
In-Reply-To: <CANzqJaA17=QxTjNHMmy3xBUcaT5o5ZwxDu74d9tatb8Lwka=2w@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CANzqJaA17=QxTjNHMmy3xBUcaT5o5ZwxDu74d9tatb8Lwka=2w@mail.gmail.com>
On Fri, Mar 28, 2025 at 9:24 AM Ron Johnson <[email protected]> wrote:
>
> "at least for WHERE conditions that are selective" confuses me. Aren't
> _all_ WHERE clauses selective?
>
>
From earlier in the email, selectivity is a scale, the wording here implies
"has a meaningful selectivity".
"Fundamentally yes, but you also have to consider how selective the
conditions are." - Laurenz
where true - selectivity 0
where not(is_deleted) - selectivity < .01 ish in many cases
Selectivity is evaluating cardinality with an eye on the frequency of
the values you are actually going to be filtering on. So low cardinality
booleans can be highly selective in usage if you are looking for the rare
false in a sea of trues but low selectivity if looking through those trues.
David J.
view thread (3+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: BTREE index: field ordering
In-Reply-To: <CAKFQuwZKD=6PQyuC-_Krw8qOESYNhOC+ZNDQYYgqC5402kY0nA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox