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 viewpriority is basically a long value containing created_date in milliseconds. Issue here is : I want to somehow include *modified_date also in this query to get the records sorted by **modified_date . But that sorting will happen only in the specified created_date range only. I want those latest modified records also whose created_date might not lie in this range.* *Thanks * On Tue, Jun 29, 2021 at 1:22 AM Michael Lewis <mle...@entrata.com> wrote: > Do you have an index on the "updated_at" field and found that the query is > too slow? Do you have an example query? >