Re: checking for a NULL date in a partitioned table kills performance - Mailing list pgsql-performance

From Tom Lane
Subject Re: checking for a NULL date in a partitioned table kills performance
Date
Msg-id 2099116.1724371519@sss.pgh.pa.us
Whole thread Raw
Responses Re: checking for a NULL date in a partitioned table kills performance
List pgsql-performance
Sbob <sbob@quadratum-braccas.com> writes:
> 29 million of the 32 million rows in the table have NULL for contract_date

[ blink... ]  So your query is selecting at least 29/32nds of the
table, plus however much matches the contract_date > '2022-01-01'
alternative.  I'm not sure how you expect that to be significantly
cheaper than scanning the whole table.

            regards, tom lane



pgsql-performance by date:

Previous
From: Vitalii Tymchyshyn
Date:
Subject: Re: checking for a NULL date in a partitioned table kills performance (accidentally sent to the admin list before)
Next
From: Rui DeSousa
Date:
Subject: Re: checking for a NULL date in a partitioned table kills performance