Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a6jH0-0004Bq-VB for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2015 18:15:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a6jGz-0000ho-0N for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Dec 2015 18:15:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a6jFe-0007bh-Ta for pgsql-hackers@postgresql.org; Wed, 09 Dec 2015 18:14:07 +0000 Received: from wizmail.org ([2a00:1940:107::2:0:0]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a6jFc-0007xb-7H for pgsql-hackers@postgresql.org; Wed, 09 Dec 2015 18:14:05 +0000 Received: from [2a00:b900:109e:0:3e97:eff:feb2:e128] (helo=lap.dom.ain) by wizmail.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_139-4deb125) id 1a6jFY-0005Qs-FZ for pgsql-hackers@postgresql.org (return-path ); Wed, 09 Dec 2015 18:14:00 +0000 Subject: Re: Using quicksort for every external sort run To: pgsql-hackers@postgresql.org References: From: Jeremy Harris Message-ID: <56686F67.4010303@wizmail.org> Date: Wed, 9 Dec 2015 18:13:59 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pcms-Received-Sender: [2a00:b900:109e:0:3e97:eff:feb2:e128] (helo=lap.dom.ain) with esmtpsa X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 09/12/15 00:02, Jeff Janes wrote: > The second one consumes that giant tape run along with 232 small tape > runs. In terms of number of comparisons, binary merge works best when the inputs are of similar length. I'd assume the same goes for n-ary merge, but I don't know if comparison count is an issue here. -- Cheers, Jeremy -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers