X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id E88D8D1B98E for ; Sat, 23 Aug 2003 01:14:25 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 74013-01 for ; Sat, 23 Aug 2003 01:14:15 -0300 (ADT) Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by svr1.postgresql.org (Postfix) with SMTP id BBFAED1B995 for ; Sat, 23 Aug 2003 01:14:14 -0300 (ADT) Received: from pcp04100620pcs.neave01.pa.comcast.net (HELO yahoo.com) (renneyt@68.81.196.130 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 23 Aug 2003 04:14:13 -0000 Message-ID: <3F46EA13.9030306@yahoo.com> Date: Sat, 23 Aug 2003 00:14:11 -0400 From: Renney Thomas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: pgsql-admin@postgresql.org Subject: Re: Indexing a boolean References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/265 X-Sequence-Number: 9986 scott.marlowe wrote: >On Thu, 21 Aug 2003, Kris Kiger wrote: > > >>I would appreciate it if I could get some thoughts on indexing a field >>with only two values? For example, I have a table with a few million >> >>Often the best approach here is to make a partial index: >> >>create index table_dx on table (bool_field) where bool_field IS TRUE; >> >>This works well if you have a large portion of the boolean fields set to >>FALSE, and want to find the few that are TRUE. Reverse the TRUE and false >>for other situations. >> >> >> When will PGSql have bitmapped indexes for these cases - like Oracle? Will it be in a release sometime soon?