X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id EA52A9FA621 for ; Mon, 24 Jul 2006 22:51:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 21310-04 for ; Tue, 25 Jul 2006 01:51:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from linuxworld.com.au (unknown [203.34.46.50]) by postgresql.org (Postfix) with ESMTP id AF12A9FA60C for ; Mon, 24 Jul 2006 22:51:15 -0300 (ADT) Received: from linuxworld.com.au (IDENT:swm@localhost.localdomain [127.0.0.1]) by linuxworld.com.au (8.13.2/8.13.2) with ESMTP id k6P1p5gj000495; Tue, 25 Jul 2006 11:51:06 +1000 Received: from localhost (swm@localhost) by linuxworld.com.au (8.13.2/8.13.2/Submit) with ESMTP id k6P1p5Fx000492; Tue, 25 Jul 2006 11:51:05 +1000 Date: Tue, 25 Jul 2006 11:51:05 +1000 (EST) From: Gavin Sherry To: Bruce Momjian cc: Jie Zhang , Hannu Krosing , Tom Lane , pgsql-hackers@postgresql.org, Luke Lonergan Subject: Re: On-disk bitmap index patch In-Reply-To: <200607250104.k6P14St25388@momjian.us> Message-ID: References: <200607250104.k6P14St25388@momjian.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200607/1108 X-Sequence-Number: 86963 On Mon, 24 Jul 2006, Bruce Momjian wrote: > Jie Zhang wrote: > > > IIRC they quoted the cardinality of 10000 as something that is still > > > faster than btree for several usecases. > > > > > > And also for AND-s of several indexes, where indexes are BIG, your btree > > > indexes may be almost as big as tables but the resulting set of pages is > > > small. > > > > Yeah, Hannu points it out very well -- the bitmap index works very well when > > columns have low cardinalities and AND operations will produce small number > > of results. > > What operations on columns of low cardinality produce a small number of > results? That seems contradictory. WHERE a = 1 and b = 2 a = 1 may be 5% of the table and b = 2 may be 5% of the table but their intersection may be .001%. Luke: the URL you sent to the bitmap slides was internal to Greenplum. Would you be able to put them on a public site? Thanks, Gavin