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 BD4D55352E; Mon, 9 May 2005 10:40:36 -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 19073-03; Mon, 9 May 2005 13:40:34 +0000 (GMT) Received: from perseverance.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by svr1.postgresql.org (Postfix) with ESMTP id 35B21534D3; Mon, 9 May 2005 10:40:33 -0300 (ADT) Received: from [132.205.44.35] (IDENT:emilu@curacao.cs.concordia.ca [132.205.44.35]) by perseverance.encs.concordia.ca (8.12.11/8.12.11) with ESMTP id j49DeaYa016604; Mon, 9 May 2005 09:40:36 -0400 Message-ID: <427F6853.90308@cs.concordia.ca> Date: Mon, 09 May 2005 09:40:35 -0400 From: Ying Lu User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-general@postgresql.org Cc: pgsql-performance@postgresql.org Subject: "Hash index" vs. "b-tree index" (PostgreSQL 8.0) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2005/05/09 09:40:36 EDT X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.021 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/370 X-Sequence-Number: 77718 Greetings, We are working on speeding up the queries by creating indexes. We have queries with searching criteria such as "select ... where *col1='...'*". This is a simple query with only "=" operation. As a result I setup hash index on column "col1". While, in postgreSQL 8 doc, it is wirttern: *Note: * Testing has shown PostgreSQL's hash indexes to perform no better than B-tree indexes, and the index size and build time for hash indexes is much worse. For these reasons, hash index use is presently discouraged. May I know for simple "=" operation query, for "Hash index" vs. "B-tree" index, which can provide better performance please? Thanks, Emi