Re: Partition By Range Without PrimaryKey : Postgresql Version 12.8 on AWS RDS

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


> On May 22, 2023, at 8:07 AM, Phani Prathyush Somayajula <phani.somayajula@xxxxxxxxxxxxxxxxx> wrote:
> However, since I was telling other ripple effects, we're trying to test creating subpartitions by placedon and partitions by brandid like below.
>  The reason being : we'll have to archive or purge the data post 90 days.

You could still partition by placedon... Partitioning by brandid is not much help with rotating out old data.

Why the change in primary key? In fact, your primary key in that example is not guaranteed unique--if I'm reading this correctly there is a chance of collision.

What's wrong with partitioning by placedon, with a primary key of (betid, placedon)?

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux