X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E0D56D9836; Mon, 26 Sep 2005 22:42:20 -0300 (ADT) 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 65163-02; Tue, 27 Sep 2005 01:42:15 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4E380D9834; Mon, 26 Sep 2005 22:42:16 -0300 (ADT) 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 j8R1gItD006142; Mon, 26 Sep 2005 21:42:18 -0400 (EDT) To: Ron Peacetree Cc: Dann Corbit , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [PERFORM] A Better External Sort? In-reply-to: <19483839.1127783447942.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> References: <19483839.1127783447942.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> Comments: In-reply-to Ron Peacetree message dated "Mon, 26 Sep 2005 21:10:47 -0400" Date: Mon, 26 Sep 2005 21:42:18 -0400 Message-ID: <6141.1127785338@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/1191 X-Sequence-Number: 73588 Ron Peacetree writes: > Let's start by assuming that an element is <= in size to a cache line and a > node fits into L1 DCache. [ much else snipped ] So far, you've blithely assumed that you know the size of a cache line, the sizes of L1 and L2 cache, and that you are working with sort keys that you can efficiently pack into cache lines. And that you know the relative access speeds of the caches and memory so that you can schedule transfers, and that the hardware lets you get at that transfer timing. And that the number of distinct key values isn't very large. I don't see much prospect that anything we can actually use in a portable fashion is going to emerge from this line of thought. regards, tom lane