Re: checking for a NULL date in a partitioned table kills performance
В списке pgsql-admin по дате отправления:
| От | Scott Ribe |
|---|---|
| Тема | Re: checking for a NULL date in a partitioned table kills performance |
| Дата | |
| Msg-id | 1F2BA008-3732-4289-876A-EF6889474E08@elevated-dev.com обсуждение |
| Ответ на | Re: checking for a NULL date in a partitioned table kills performance (Doug Reynolds <mav@wastegate.net>) |
| Ответы |
Re: checking for a NULL date in a partitioned table kills performance
Re: checking for a NULL date in a partitioned table kills performance |
| Список | pgsql-admin |
> On Aug 23, 2024, at 5:39 AM, Doug Reynolds <mav@wastegate.net> wrote: > > You could try something really ugly where you make a function index that COALESCEs the nulls to 1-1-1900 and use the COALESCEin the query. I don't see how that could be better than just creating a partial index on it WHERE contract_date IS NULL--and anyway I'msure you're right that no index would help. No matter what, it seems that sequential scans of all partitions will be requiredsince most rows have it null, and it's not even related to the partition key.
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера