X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 2F4A211F6279 for ; Wed, 19 Apr 2006 02:18:44 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.398 X-Spam-Level: X-Spam-Status: No, score=-2.398 required=5 tests=[AWL=0.201, BAYES_00=-2.599] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id TU9CGNTrZyaM for ; Wed, 19 Apr 2006 02:18:37 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id A19A211F6278 for ; Wed, 19 Apr 2006 02:18:36 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 72BB256427; Wed, 19 Apr 2006 00:18:36 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 19 Apr 2006 00:18:35 -0500 Date: Wed, 19 Apr 2006 00:18:35 -0500 From: "Jim C. Nasby" To: Mark Kirkwood Cc: Tom Lane , Markus Schaber , pgsql-performance@postgresql.org Subject: Re: merge>hash>loop Message-ID: <20060419051835.GR49405@pervasive.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4445C0EC.2060407@paradise.net.nz> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060419:markir@paradise.net.nz::MjYy81ky3/XDY4UR:000000000000000 0000000000000000000000001tfE X-Hashcash: 1:20:060419:tgl@sss.pgh.pa.us::c+a/DJgT3joWhNUf:00000000000000000000 0000000000000000000000000kmb X-Hashcash: 1:20:060419:schabi@logix-tt.com::yAna6PjD8GxHdwyB:000000000000000000 0000000000000000000000004nAT X-Hashcash: 1:20:060419:pgsql-performance@postgresql.org::Dbw8GgcWLiwAfs31:00000 0000000000000000000000006UeQ X-Archive-Number: 200604/417 X-Sequence-Number: 18501 On Wed, Apr 19, 2006 at 04:47:40PM +1200, Mark Kirkwood wrote: > Jim C. Nasby wrote: > >On Tue, Apr 18, 2006 at 06:22:26PM -0400, Tom Lane wrote: > >>"Jim C. Nasby" writes: > >>>Actually, if you run with stats_block_level turned on you have a > >>>first-order approximation of what is and isn't cached. > >>Only if those stats decayed (pretty fast) with time; which they don't. > > > >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 - what buffers from what > relation are in shared_buffers (if you want to interrogate the os file So theoretically with that code we could make the cost estimator functions more intelligent about actual query costs. Now, how you'd actually see how those estimates improved... > buffer cache, that's a different story - tho I've been toying with doing > a utility for Freebsd that would do this). Well, the problem is that I doubt anything that OS-specific would be accepted into core. What we really need is some method that's OS-agnostic... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461