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 C6E0A53754 for ; Tue, 10 May 2005 19:56:29 -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 82896-03 for ; Tue, 10 May 2005 22:56:27 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 95ADD533C1 for ; Tue, 10 May 2005 19:56:25 -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 j4AMuLxr027800; Tue, 10 May 2005 18:56:21 -0400 (EDT) To: Mischa Sandberg Cc: "Jim C. Nasby" , Neil Conway , Christopher Petrilli , Ying Lu , pgsql-general@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL In-reply-to: <1115760957.4281293e0155b@webmail.telus.net> References: <427F6853.90308@cs.concordia.ca> <427F757A.8000407@samurai.com> <59d991c405050908271b55e673@mail.gmail.com> <427F8321.5030702@samurai.com> <20050509163423.GH35026@decibel.org> <427F9211.2090008@samurai.com> <20050509165133.GJ35026@decibel.org> <427FFCD3.1010803@samurai.com> <20050510153245.GA31103@decibel.org> <1115760957.4281293e0155b@webmail.telus.net> Comments: In-reply-to Mischa Sandberg message dated "Tue, 10 May 2005 14:35:58 -0700" Date: Tue, 10 May 2005 18:56:21 -0400 Message-ID: <27799.1115765781@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/519 X-Sequence-Number: 77867 Mischa Sandberg writes: > The PG hash join is the simplest possible: build a hash table in memory, > and match an input stream against it. > *Hybrid hash* is where you spill the hash to disk in a well-designed > way. Instead of thinking of it as building a hash table in memory, think > of it as partitioning one input; if some or all of it fits in memory, > all the better. The boundary condition is the same. [ raised eyebrow... ] Apparently you've not read the code. It's been hybrid hashjoin since we got it from Berkeley. Probably not the best possible implementation of the concept, but we do understand about spill to disk. regards, tom lane