Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A9AD8476085 for ; Mon, 2 Dec 2002 18:16:07 -0500 (EST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by postgresql.org (Postfix) with ESMTP id 4B2AA4764D3 for ; Mon, 2 Dec 2002 18:15:38 -0500 (EST) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 568A43F4E; Mon, 2 Dec 2002 18:15:40 -0500 (EST) From: "Dan Langille" To: "David F. Skoll" Date: Mon, 02 Dec 2002 18:15:40 -0500 MIME-Version: 1.0 Subject: Re: What kind of index to use for many rows with few unique values? Cc: pgsql-admin@postgresql.org Message-ID: <3DEBA34C.13623.F8752328@localhost> In-reply-to: X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/16 X-Sequence-Number: 6511 On 2 Dec 2002 at 17:10, David F. Skoll wrote: > I've heard that a btree index performs badly in this situation. As another poster has shown, it should be OK. I recently dealt with distributions simlar to your example. > Is a hash index appropriate? I've heard bad things about hash > indexes in PostgreSQL. No, don't use them. I didn't get any performance increase out of them. Does your experience show poor btree results? -- Dan Langille : http://www.langille.org/