Re: Partitioning on the date part of a timestamp & PK issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-Jul-15, Wells Oliver wrote:

> Correct me if I'm wrong, but wouldn't partitioning by just the ts column
> create a ton of partitions per the granular nature of timestamps? Or do I
> wildly misunderstand this? Another Very Large Table we have partitioned by
> a date field cleanly creates monthly partitions.

You decide the boundaries values of each partition.  Dates are granular
to days, yet you have created partitions cleanly on month boundaries.
Same with timestamps.  Nobody is forcing you to create one partition per
microsecond.

Anyway, I don't think what you want is possible.  Your partition needs
to be formed by columns that are in the primary key, and your primary
key columns are already defined.  You can partition by guid, or
partition by tid, or partition by seq, or any combination thereof.  You
cannot partition by the date column.  The error about expressions being
unusable is just a forerunner.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux