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 705D09FB235 for ; Fri, 28 Jul 2006 19:13:37 -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 93629-09 for ; Fri, 28 Jul 2006 19:13:21 -0300 (ADT) X-Greylist: whitelisted by SQLgrey- Received: from ms-smtp-04.southeast.rr.com (ms-smtp-04.southeast.rr.com [24.25.9.103]) by postgresql.org (Postfix) with ESMTP id 858E79FB286 for ; Fri, 28 Jul 2006 19:12:42 -0300 (ADT) Received: from [192.168.10.103] (cpe-024-211-165-134.nc.res.rr.com [24.211.165.134]) by ms-smtp-04.southeast.rr.com (8.13.6/8.13.6) with ESMTP id k6SMCIlP006331; Fri, 28 Jul 2006 18:12:19 -0400 (EDT) Message-ID: <44CA8BC4.2080204@dunslane.net> Date: Fri, 28 Jul 2006 18:12:20 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060607 Fedora/1.0.2-1.fc5 SeaMonkey/1.0.2 MIME-Version: 1.0 To: Tom Lane CC: Dann Corbit , Luke Lonergan , "Jim C. Nasby" , Jie Zhang , Mark Kirkwood , Josh Berkus , Gavin Sherry , pgsql-hackers@postgresql.org Subject: Re: On-disk bitmap index patch References: <809.1154117933@sss.pgh.pa.us> In-Reply-To: <809.1154117933@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.017 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200607/1493 X-Sequence-Number: 87348 Tom Lane wrote: > > Both of these pages say up front that they are considering read-only > data. So one of the questions that has to be answered (and the > submitters have been entirely mum about) is exactly how bad is the > update performance? If it's really awful that's going to constrain > the use cases quite a lot, whereas merely "a bit slower than btree" > wouldn't be such a problem. > > In any case, arguing that other DBs find it's a win will cut no ice > with me. See adjacent discussion about hash indexes --- those *ought* > to be a win, but they aren't in Postgres, for reasons that are still > guesses. The translation gap between other DBs' experience and ours > can be large. > Notwithstanding that, I have a couple of non-postgres data points / anecdotes on this. Back in my days as an Ingres DBA in the mid 90s, our fairly highly tuned system used hash organised tables only for small fairly static lookup-type tables (state codes, postcodes, etc). Everything that was more dynamic was done with btree indexed tables. A few years later, I was producing very large tables of email addresses using BDB. I quickly stopped using hash tables when I found that the reorganisation penalty was huge. Switching to btree worked just fine, with no sudden performance blip. This might not be directly relevant, but clearly the bucket size is. I guess what we need to demonstrate is that the better hash performance will actually persist to a scale where it is actually worth it - surely for very small tables the index method won't matter much anyway. cheers andrew