Re: Use case stuck due to Partitioning

2021-06-28 Thread David G. Johnston
On Mon, Jun 28, 2021 at 2:51 PM Michael Lewis wrote: > I am unclear exactly what you want to do with modified_date. Can you write > pseudo code perhaps? > > I second this. While I'm not all that familiar with partitioning I am readily getting the feeling that whether or not partitioning is used

Re: Use case stuck due to Partitioning

2021-06-28 Thread Michael Lewis
I am unclear exactly what you want to do with modified_date. Can you write pseudo code perhaps? It sounds like you are wanting to union all the results of the query you gave, with the results of a similar query where modified_date >= '2021-03-01 08:16:13.589' and created_at < '2021-03-01 08:16:13.

Re: Use case stuck due to Partitioning

2021-06-28 Thread Shubham Mittal
Hi Michael, Yes I have a btree index on the *modified_date* column currently. SELECT * FROM partitioned_table where A ='Value' AND created_date >= '2021-03-01 08:16:13.589' and created_date <= '2021-04-02 08:16:13.589' ORDER BY viewpriority desc OFFSET 0 ROWS FETCH NEXT 200 ROWS ONLY; Here

Re: Use case stuck due to Partitioning

2021-06-28 Thread Michael Lewis
Do you have an index on the "updated_at" field and found that the query is too slow? Do you have an example query?

Use case stuck due to Partitioning

2021-06-28 Thread Shubham Mittal
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