From: | sud <suds1434(at)gmail(dot)com> |
---|---|
To: | Lok P <loknath(dot)73(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Is partition pruning impacted by data type |
Date: | 2024-03-05 19:29:41 |
Message-ID: | CAD=mzVWF=Ho3eUcpSYsDYms91weeSiRpcXOQRdEUgP7KHjBm0g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-performance |
Thank you.
Yes, I tried creating a table manually with column timestamptz(6) type and
partitioned on that and then executed select query with the filter on that
column and I do see partition pruning happening. Not able to visualize any
other issues though, however some teammates say it may have a negative
impact on aggregation type queries , not sure how but will try to test it.
Thanks again for the response.
On Wed, Mar 6, 2024 at 12:35 AM Lok P <loknath(dot)73(at)gmail(dot)com> wrote:
>
> On Tue, Mar 5, 2024 at 1:09 AM sud <suds1434(at)gmail(dot)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.
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Lanitz | 2024-03-06 10:39:29 | Re: pgBadger: Cannot find any log entries from systemd-journald |
Previous Message | Lok P | 2024-03-05 19:05:02 | Re: Is partition pruning impacted by data type |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2024-03-05 20:13:13 | Re: Separate 100 M spatial data in 100 tables VS one big table |
Previous Message | Lok P | 2024-03-05 19:05:02 | Re: Is partition pruning impacted by data type |