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 A17BF9F95E3 for ; Tue, 25 Jul 2006 18:53:30 -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 99131-04 for ; Tue, 25 Jul 2006 18:53:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 709DE9F9316 for ; Tue, 25 Jul 2006 18:53:26 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id E845330E15; Tue, 25 Jul 2006 23:53:24 +0200 (MET DST) From: Ron Mayer X-Newsgroups: pgsql.hackers Subject: Re: On-disk bitmap index patch Date: Tue, 25 Jul 2006 14:53:29 -0700 Organization: Hub.Org Networking Services Lines: 16 Message-ID: <44C692D9.3050406@cheapcomplexdevices.com> References: <200607250104.k6P14St25388@momjian.us> <20060725015805.GA30087@mark.mielke.cc> <5085.1153802202@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org To: Tom Lane User-Agent: Thunderbird 1.5.0.4 (X11/20060615) In-Reply-To: <5085.1153802202@sss.pgh.pa.us> To: pgsql-hackers@postgresql.org 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/1227 X-Sequence-Number: 87082 Tom Lane wrote: > mark@mark.mielke.cc writes: >> Reading 1/4, for a larger table, has a good chance of being faster than >> reading 4/4 of the table. :-) > > Really? > > If you have to hit one tuple out of four, it's pretty much guaranteed > that you will need to fetch every heap page. I think it's not uncommon to have data that is more clustered than expected. In my case it shows up often in GIS data; where often a query that only accesses 1/4 of the rows in the table really will only access about 1/4 of the pages in the table -- for example when analyzing Texas or the Southwest US.