X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4C37053CDB for ; Tue, 10 May 2005 23:02:07 -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 10009-09 for ; Wed, 11 May 2005 02:02:00 +0000 (GMT) Received: from priv-edtnes28.telusplanet.net (outbound04.telus.net [199.185.220.223]) by svr1.postgresql.org (Postfix) with ESMTP id 50CE7533EE for ; Tue, 10 May 2005 23:01:58 -0300 (ADT) Received: from localhost ([199.185.220.240]) by priv-edtnes28.telusplanet.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20050511020202.HRKQ7458.priv-edtnes28.telusplanet.net@localhost>; Tue, 10 May 2005 20:02:02 -0600 Received: from 209.17.183.249 ( [209.17.183.249]) as user a3a18850@204.209.205.53 by webmail.telus.net with HTTP; Tue, 10 May 2005 19:02:02 -0700 Message-ID: <1115776922.4281679a8e67f@webmail.telus.net> Date: Tue, 10 May 2005 19:02:02 -0700 From: Mischa Sandberg To: Bruce Momjian Cc: pgsql-general@postgresql.org Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL References: <200505110151.j4B1pnt16211@candle.pha.pa.us> In-Reply-To: <200505110151.j4B1pnt16211@candle.pha.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1-cvs X-Originating-IP: 209.17.183.249 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.04 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200505/530 X-Sequence-Number: 77878 Quoting Bruce Momjian : > > Is there a TODO anywhere in this discussion? If so, please let me > know. > Umm... I don't think so. I'm not clear on what TODO means yet. 'Up for consideration'? If a "TODO" means committing to do, I would prefer to follow up on a remote-schema (federated server) project first. ... > > If there were room for improvement, (and I didn't see it in the > source) > > it would be the logic to: > > > > - swap inner and outer inputs (batches) when the original inner > turned > > out to be too large for memory, and the corresponding outer did > not. If > > you implement that anyway (complicates the loops) then it's no > trouble > > to just hash the smaller of the two, every time; saves some CPU. > > > > - recursively partition batches where both inner and outer input > batch > > ends up being too large for memory, too; or where the required > number of > > batch output buffers alone is too large for working RAM. This is > only > > for REALLY big inputs. > > > > Note that you don't need a bad hash function to get skewed batch > sizes; > > you only need a skew distribution of the values being hashed.