X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9AD5D9FA666 for ; Tue, 25 Jul 2006 15:39:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 79184-05 for ; Tue, 25 Jul 2006 15:38:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from outmail128180.authsmtp.com (outmail128180.authsmtp.com [62.13.128.180]) by postgresql.org (Postfix) with ESMTP id DC8EB9FAE4E for ; Tue, 25 Jul 2006 15:38:55 -0300 (ADT) Received: from [10.10.15.126] (ip10.fa1-0-2.occ.iinet.com [198.145.33.10]) (authenticated bits=0) by squirrel.dmpriest.net.uk (8.13.6/8.13.6/Kp) with ESMTP id k6PIcYou057034; Tue, 25 Jul 2006 19:38:35 +0100 (BST) Message-ID: <44C6652C.1020203@agliodbs.com> Date: Tue, 25 Jul 2006 11:38:36 -0700 From: Josh Berkus User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane CC: Gavin Sherry , Jie Zhang , pgsql-hackers@postgresql.org, Luke Lonergan Subject: Re: On-disk bitmap index patch References: <28525.1153698215@sss.pgh.pa.us> <28750.1153700718@sss.pgh.pa.us> In-Reply-To: <28750.1153700718@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server-Quench: c9310ef4-1c0c-11db-b770-001185d377ca X-AuthRoute: OCdyZgscClZXSx8a IioLCC5HRQ8+YBZL BAkGMA9GIUINWEQM c1AAcx1xLVlbHwkB BXYKUl5XWFdyXi10 YgJPbAFYfElNQQRq T0pMQFdNFEszB3x4 VXdBFxl3cAVFfDBx Y0ZlECNSX0V6IBB5 X08HFT4bZGY0On1N V0dYagNUcQJCe0tG bVcsBT1vNG8XDQIR NCweBQsEdRJZbShU WQJFJ1MORE8TVj86 Sx0SVS0mAUYFL2Qg X-Authentic-SMTP: 61633136333939.squirrel.dmpriest.net.uk:1.56/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.025 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200607/1208 X-Sequence-Number: 87063 Tom, > (I'm also wondering whether this > doesn't overlap the use-case for GIN.) It does not. GIN is strictly for multi-value fields. I can think of applications where either GIN or Bitmaps would be an option, but for the majority, they wouldn't. One particular compelling situation for on-disk bitmaps is for terabyte tables where a btree index would not fit into memory. Index performance for an index which is 10x or more the size of RAM really sucks ... I can come up with some test results if you doubt that. Also note that "low cardinality" is relative. For a 1 billion row table, a column with 10,000 values is "low-cardinality", having around 100,000 rows per value ... but that's still 0.01% of the table per value, making index use still applicable. --Josh