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 0383F9FA5BF for ; Mon, 24 Jul 2006 11:01:58 -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 47059-07 for ; Mon, 24 Jul 2006 14:01:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.skype.net (mail.skype.net [195.215.8.149]) by postgresql.org (Postfix) with ESMTP id 41BC69FA50D for ; Mon, 24 Jul 2006 11:01:51 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.skype.net (Postfix) with ESMTP id 8ED874E15F; Mon, 24 Jul 2006 16:01:48 +0200 (CEST) Received: from [10.10.10.6] (217-159-136-226-dsl.kt.estpak.ee [217.159.136.226]) by mail.skype.net (Postfix) with ESMTP id E8A204E18F; Mon, 24 Jul 2006 15:59:36 +0200 (CEST) Subject: Re: On-disk bitmap index patch From: Hannu Krosing To: Tom Lane Cc: Gavin Sherry , Jie Zhang , pgsql-hackers@postgresql.org, Luke Lonergan In-Reply-To: <28750.1153700718@sss.pgh.pa.us> References: <28525.1153698215@sss.pgh.pa.us> <28750.1153700718@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Date: Mon, 24 Jul 2006 16:59:35 +0300 Message-Id: <1153749575.2909.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 (2.6.2-1.fc5.5) Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/1031 X-Sequence-Number: 86886 Ühel kenal päeval, P, 2006-07-23 kell 20:25, kirjutas Tom Lane: > Gavin Sherry writes: > > On Sun, 23 Jul 2006, Tom Lane wrote: > >> However, the main problem I've got with this is that a new index AM is a > >> pretty large burden, and no one's made the slightest effort to sell > >> pghackers on taking this on. > > > For low cardinality sets, bitmaps greatly out perform btree. > > If the column is sufficiently low cardinality, you might as well just do > a seqscan --- you'll be hitting most of the heap's pages anyway. I'm > still waiting to be convinced that there's a sweet spot wide enough to > justify supporting another index AM. (I'm also wondering whether this > doesn't overlap the use-case for GIN.) 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. -- ---------------- Hannu Krosing Database Architect Skype Technologies OÜ Akadeemia tee 21 F, Tallinn, 12618, Estonia Skype me: callto:hkrosing Get Skype for free: http://www.skype.com