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 55C8353C1F; Mon, 9 May 2005 11:37:00 -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 29355-06; Mon, 9 May 2005 14:36:57 +0000 (GMT) Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82]) by svr1.postgresql.org (Postfix) with ESMTP id EB1BF5364A; Mon, 9 May 2005 11:36:56 -0300 (ADT) Received: from localhost (mailbox.samurai.com [205.207.28.82]) by mailbox.samurai.com (Postfix) with ESMTP id 215D418CC84; Mon, 9 May 2005 10:37:01 -0400 (EDT) Received: from mailbox.samurai.com ([205.207.28.82]) by localhost (mailbox.samurai.com [205.207.28.82]) (amavisd-new, port 10024) with LMTP id 81082-01-3; Mon, 9 May 2005 10:36:50 -0400 (EDT) Received: from [220.101.4.182] (r220-101-4-182.cpe.unwired.net.au [220.101.4.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailbox.samurai.com (Postfix) with ESMTP id 0195518CC16; Mon, 9 May 2005 10:36:48 -0400 (EDT) Message-ID: <427F757A.8000407@samurai.com> Date: Tue, 10 May 2005 00:36:42 +1000 From: Neil Conway User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ying Lu Cc: pgsql-general@postgresql.org, pgsql-performance@postgresql.org Subject: Re: "Hash index" vs. "b-tree index" (PostgreSQL 8.0) References: <427F6853.90308@cs.concordia.ca> In-Reply-To: <427F6853.90308@cs.concordia.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailbox.samurai.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/376 X-Sequence-Number: 77724 Ying Lu wrote: > May I know for simple "=" operation query, for "Hash index" vs. "B-tree" > index, which can provide better performance please? I don't think we've found a case in which the hash index code outperforms B+-tree indexes, even for "=". The hash index code also has a number of additional issues: for example, it isn't WAL safe, it has relatively poor concurrency, and creating a hash index is significantly slower than creating a b+-tree index. -Neil