From: | Scott Ribe <scott_ribe(at)elevated-dev(dot)com> |
---|---|
To: | Phani Prathyush Somayajula <phani(dot)somayajula(at)pragmaticplay(dot)com> |
Cc: | "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>, Matti Linnanvuori <matti(dot)linnanvuori(at)portalify(dot)com> |
Subject: | Re: Partition By Range Without PrimaryKey : Postgresql Version 12.8 on AWS RDS |
Date: | 2023-05-22 15:15:32 |
Message-ID: | 5F09A2FE-117F-47D4-B78B-25023A02AFB7@elevated-dev.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
> On May 22, 2023, at 8:07 AM, Phani Prathyush Somayajula <phani(dot)somayajula(at)pragmaticplay(dot)com> 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)?
From | Date | Subject | |
---|---|---|---|
Next Message | Rajeshwar Singh | 2023-05-22 16:48:03 | Source code package for libpq |
Previous Message | Phani Prathyush Somayajula | 2023-05-22 14:07:31 | RE: Partition By Range Without PrimaryKey : Postgresql Version 12.8 on AWS RDS |