On Fri, Mar 14, 2003 at 10:43:30PM -0500, Tom Lane wrote:
> Sure. That's why we have a planner that distinguishes between startup
> cost and total cost, and interpolates when a LIMIT is involved. But
> if this mergesort idea only helps for small-limit cases, that's another
> restriction on its scope of usefulness...
I don't think so, since even in the non-limit case it avoids having to
do a full sort if the number of initial streams is finite and small (as
in the case I demonstrated), reducing time complexity to O(N).
--
Taral <taral@taral.net>
This message is digitally signed. Please PGP encrypt mail to me.
"Most parents have better things to do with their time than take care of
their children." -- Me