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 E3D1AD9D13 for ; Fri, 30 Sep 2005 23:07:16 -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 72084-06 for ; Sat, 1 Oct 2005 02:07:10 +0000 (GMT) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.207]) by svr1.postgresql.org (Postfix) with ESMTP id 45CBED9D10 for ; Fri, 30 Sep 2005 23:07:11 -0300 (ADT) Received: by xproxy.gmail.com with SMTP id t15so26872wxc for ; Fri, 30 Sep 2005 19:07:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BCMDnLSIlQjE/e7n2+1hPlLAcMfoai4UndL+DtWgxn1p28GtQGo+hWYA83VJqbm2KjyxUZgTW0eEAQbhzhXSW5bjQFbTITwSApj6SINeWRVppg8jAfEx0j+BzPlaonrjk6TOIS4S7m2Iw6/UvAyHJaA4c6MuqyNA3WW6PDuyY7I= Received: by 10.70.53.14 with SMTP id b14mr1133980wxa; Fri, 30 Sep 2005 19:07:16 -0700 (PDT) Received: by 10.70.76.1 with HTTP; Fri, 30 Sep 2005 19:07:16 -0700 (PDT) Message-ID: Date: Fri, 30 Sep 2005 22:07:16 -0400 From: Gregory Maxwell Reply-To: Gregory Maxwell To: Ron Peacetree Subject: Re: [PERFORM] A Better External Sort? Cc: "Jeffrey W. Baker" , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org In-Reply-To: <21402654.1127923414088.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <21402654.1127923414088.JavaMail.root@elwamui-polski.atl.sa.earthlink.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.086 required=5 tests=[AWL=0.062, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200509/1461 X-Sequence-Number: 73858 On 9/28/05, Ron Peacetree wrote: > 2=3D We use my method to sort two different tables. We now have these > very efficient representations of a specific ordering on these tables. A > join operation can now be done using these Btrees rather than the > original data tables that involves less overhead than many current > methods. If we want to make joins very fast we should implement them using RD trees. For the example cases where a join against a very large table will produce a much smaller output, a RD tree will provide pretty much the optimal behavior at a very low memory cost. On the subject of high speed tree code for in-core applications, you should check out http://judy.sourceforge.net/ . The performance (insert, remove, lookup, AND storage) is really quite impressive. Producing cache friendly code is harder than one might expect, and it appears the judy library has already done a lot of the hard work.=20 Though it is *L*GPLed, so perhaps that might scare some here away from it. :) and good luck directly doing joins with a LC-TRIE. ;)