public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Sbob <[email protected]>
Cc: Rui DeSousa <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: checking for a NULL date in a partitioned table kills performance
Date: Thu, 22 Aug 2024 17:01:37 -0700
Message-ID: <CAKFQuwZKTiS5b_Loe21p9rFBzR5XriHODPeocP40QAECTHEMkA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Thu, Aug 22, 2024 at 4:32 PM Sbob <[email protected]> wrote:
>
> 29 million of the 32 million rows in the table have NULL for contract_date
>
>
Your expectation that this query should use an index is flawed. Indexes
are for highly selective queries. Finding nulls on that table is not
selective.
David J.
view thread (16+ 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], [email protected], [email protected]
Subject: Re: checking for a NULL date in a partitioned table kills performance
In-Reply-To: <CAKFQuwZKTiS5b_Loe21p9rFBzR5XriHODPeocP40QAECTHEMkA@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