X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 4F37411F60A7 for ; Wed, 19 Apr 2006 02:25:37 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.128 X-Spam-Level: X-Spam-Status: No, score=0.128 required=5 tests=[AWL=0.128] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id VpdPdqCGMCvs for ; Wed, 19 Apr 2006 02:25:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id A570311F60AF for ; Wed, 19 Apr 2006 02:25:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3J5PSYS022251; Wed, 19 Apr 2006 01:25:28 -0400 (EDT) To: Mark Kirkwood cc: "Jim C. Nasby" , Markus Schaber , pgsql-performance@postgresql.org Subject: Re: merge>hash>loop In-reply-to: <4445C0EC.2060407@paradise.net.nz> References: <1145029009.3422.31.camel@spectre.intellivid.com> <10000.1145031205@sss.pgh.pa.us> <1145033149.3422.41.camel@spectre.intellivid.com> <11035.1145033929@sss.pgh.pa.us> <4444C4CF.2000106@logix-tt.com> <20060418215238.GK49405@pervasive.com> <19388.1145398946@sss.pgh.pa.us> <20060418231552.GN49405@pervasive.com> <4445C0EC.2060407@paradise.net.nz> Comments: In-reply-to Mark Kirkwood message dated "Wed, 19 Apr 2006 16:47:40 +1200" Date: Wed, 19 Apr 2006 01:25:28 -0400 Message-ID: <22250.1145424328@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/418 X-Sequence-Number: 18502 Mark Kirkwood writes: > Jim C. Nasby wrote: >> Good point. :/ I'm guessing there's no easy way to see how many blocks >> for a given relation are in shared memory, either... > contrib/pg_buffercache will tell you this - I think the key word in Jim's comment was "easy", ie, cheap. Grovelling through many thousands of buffers to count the matches to a given relation doesn't sound appetizing, especially not if it gets done over again several times during each query-planning cycle. Trying to keep centralized counts somewhere would be even worse (because of locking/ contention issues). regards, tom lane