richardstartin opened a new issue, #8837: URL: https://github.com/apache/pinot/issues/8837
A query like ```sql SELECT * FROM table WHERE filter ORDER BY sorted_col DESC LIMIT 10; ``` is not optimised and hits the generic `SelectionOrderByOperator.computePartiallyOrdered()` which inserts up to 10k elements into a priority queue to discard all but the last 10. For ascending order, the query below is roughly 3-4x faster per segment. ```sql SELECT * FROM table WHERE filter ORDER BY sorted_col ASC LIMIT 10; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org