| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Sbob <sbob(at)quadratum-braccas(dot)com> |
| Cc: | Rui DeSousa <rui(dot)desousa(at)icloud(dot)com>, "pgsql-performance(at)lists(dot)postgresql(dot)org" <pgsql-performance(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: checking for a NULL date in a partitioned table kills performance |
| Date: | 2024-08-23 00:05:19 |
| Message-ID: | 2099116.1724371519@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-performance |
Sbob <sbob(at)quadratum-braccas(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rui DeSousa | 2024-08-23 00:07:55 | Re: checking for a NULL date in a partitioned table kills performance |
| Previous Message | David G. Johnston | 2024-08-23 00:01:37 | Re: checking for a NULL date in a partitioned table kills performance |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rui DeSousa | 2024-08-23 00:07:55 | Re: checking for a NULL date in a partitioned table kills performance |
| Previous Message | David G. Johnston | 2024-08-23 00:01:37 | Re: checking for a NULL date in a partitioned table kills performance |