Re: No merge sort?

From: Taral <taral(at)taral(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: No merge sort?
Date: 2003-03-15 04:07:03
Message-ID: 20030315040703.GA3313@taral.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)taral(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-03-15 04:48:10 Re: [INTERFACES] Upgrading the backend's error-message infrastructure
Previous Message Tom Lane 2003-03-15 03:43:30 Re: No merge sort?