Use case stuck due to Partitioning

From: Shubham Mittal <mittalshubham30(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Use case stuck due to Partitioning
Date: 2021-06-28 18:28:58
Message-ID: CA+ERcR-=TMwGsvs4epdi84f+ZL-_4qycDFN=rGR8owGUFW-yBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

Please find my use case below and suggest the appropriate solution:

We have done declarative partitioning over our table A based on some key
and further range sub partitioned each partition on the basis of
createddate range of 90 days.

In the search query to display last 90 day data , I give both column B and
createddate which may pick any of the required partitions.

But how can I display last 90 days data in which a record which is modified
last is also shown at the top but its created date might not lie in the
last 90 days range..

Basically, I need to partition my huge table based on some key and also on
date to split the data into smaller dataset for faster query . The UI needs
to display the latest modified records first but the created date also
needs to be given in the query to pick the right partition...

Can we do partition differently to achieve this?
Should i find the max modified date and give it in the range of the
created date.

Thanks & Regards

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Lewis 2021-06-28 19:51:49 Re: Use case stuck due to Partitioning
Previous Message Abraham, Danny 2021-06-28 17:57:06 RE: Re: WARNING: skipping "pg_database" --- only superuser can analyze it