Re: Use case stuck due to Partitioning

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Use case stuck due to Partitioning
Дата
Msg-id CAHOFxGqB0_5LqkcYFFKDCDU+i1Diu-dzjZ+o4d5J8S-fJRVmwg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use case stuck due to Partitioning  (Shubham Mittal <mittalshubham30@gmail.com>)
Ответы Re: Use case stuck due to Partitioning
Список pgsql-general
I am unclear exactly what you want to do with modified_date. Can you write pseudo code perhaps?

It sounds like you are wanting to union all the results of the query you gave, with the results of a similar query where modified_date >= '2021-03-01 08:16:13.589' and created_at < '2021-03-01 08:16:13.589'.

However, if modified date is not null, and is set to the created_date by default, then there seems no reason to check the created_date except if partition pruning at plan time is very important.

Are you experiencing an actual performance problem, are you unsure how to write the query for the data you want, or is this premature optimization?

В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: ALTER TABLE ... DETACH PARTITION just sitting there
Следующее
От: Ron
Дата:
Сообщение: Re: ALTER TABLE ... DETACH PARTITION just sitting there