X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D271B8B9B8A for ; Sat, 5 Feb 2005 23:01:32 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 57036-08 for ; Sat, 5 Feb 2005 23:01:20 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id BEDD28B9B19 for ; Sat, 5 Feb 2005 23:01:21 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j15N14tq000191; Sat, 5 Feb 2005 18:01:04 -0500 (EST) To: Greg Stark Cc: Dirk Lutzebaeck , pgsql-performance@postgresql.org Subject: Re: query produces 1 GB temp file In-reply-to: <87mzuik4ey.fsf@stark.xeocode.com> References: <20050205182117.0125074@mail2.aeccom.com> <87y8e2kb8j.fsf@stark.xeocode.com> <29929.1107643284@sss.pgh.pa.us> <87mzuik4ey.fsf@stark.xeocode.com> Comments: In-reply-to Greg Stark message dated "05 Feb 2005 17:50:13 -0500" Date: Sat, 05 Feb 2005 18:01:03 -0500 Message-ID: <190.1107644463@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/86 X-Sequence-Number: 10415 Greg Stark writes: > Am I wrong? I thought the disk sort algorithm was the polyphase tape sort from > Knuth which is always reading two tapes and writing to a third. It is a polyphase sort, but we recycle the input "tapes" as fast as we use them, so that the maximum disk space usage is about as much as the data volume to sort. regards, tom lane