Re: Is partition pruning impacted by data type

Поиск
Список
Период
Сортировка
От Lok P
Тема Re: Is partition pruning impacted by data type
Дата
Msg-id CAKna9VY_5=7mjukRocOM9NC7wUfF=dgE4qHSySF7ZEr_x33-Bg@mail.gmail.com
обсуждение исходный текст
Ответ на Is partition pruning impacted by data type  (sud <suds1434@gmail.com>)
Ответы Re: Is partition pruning impacted by data type
Список pgsql-general

On Tue, Mar 5, 2024 at 1:09 AM sud <suds1434@gmail.com> wrote:

However the question we have is , 
1)If there is any downside of having the partition key with "timestamp with timezone" type? Will it impact the partition pruning of the queries anyway by appending any run time "time zone" conversion function during the query planning/execution phase? 
2) As it will take the default server times , so during daylight saving the server time will change, so in that case, can it cause any unforeseen issue?
3)Will this cause the data to be spread unevenly across partitions and make the partitions unevenly sized? If will go for UTC/GMT as db time, the user's one day transaction might span across two daily partitions. 


My 2 cents.
We have cases which use the "timestamp with timezone" column as partition key  and the partition pruning happens for the read queries without any issue, so we don't see any conversion functions applied to the predicate as such which is partition key. I think if the users go global it's better to have the database time in UTC time zone. and it's obvious that, In case of global users the data ought to be span across multiple days as the days won't be as per the users time zone rather UTC.



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

Предыдущее
От: Greg Sabino Mullane
Дата:
Сообщение: Re: When manual analyze is needed
Следующее
От: sud
Дата:
Сообщение: Re: Is partition pruning impacted by data type