The only thing you're adding to the query is a second SORT step, so it shouldn't require any more time/memory than the query's first SORT

Interesting -- I wonder if it would be possible for the optimizer to
detect this and avoid the redundant inner sort ... (/me muses to

That's somethign I've wondered myself as well. Also - I wonder if the optimiser could be made smart enough to push down the outer LIMIT and OFFSET clauses into the subquery.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

Reply via email to