Open iosifnicolae2 opened 2 years ago
Thanks, @iosifnicolae2 for raising an issue.
The ORDER BY and/or LIMIT/OFFSET push-downs are currently not supported. However, the same is on our roadmap and we already started working on it.
@vaibhavdalvi93 thank you for the reply.
How can I help? Do you happen to have a rough estimate on how much would it take to be pushed on the master branch?
Thanks!
PS. (off-topic) This extension would be very helpful for people currently using Hasura
We are planning to get both these pushdowns checked-in in the next quarter.
Thanks for using the extension. Your constant feedback and feature requests are all welcome.
Please let me know if you have any beta updates so I can give it a try.
Thanks!
Also, would it possible to push-down LIMIT
operator? (we're querying a big database and unfortunetly the extension is not feasible for our use-case yet.. )
Yes. We are working on both the push-downs.
Note that, if the query has an ORDER BY clause as well as a LIMIT clause, then only LIMIT can't be pushed down if ORDER BY doesn't. As LIMIT's output depended on the sorted result-set. So if your query has both clauses, then essentially you need both these pushdowns. So we are working on them in parallel.
Use case
I have the following query:
QUERY PLAN:
The problem
The query is very slow, most likely the extension is fetching all the rows then order them in PostgresSQL.
Question
How can I implement ORDER BY push-down so that PostgreSQL receives just the first row? cc @jeevanchalke
Thank you!