X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3D482D9B43 for ; Fri, 21 Oct 2005 09:40:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83355-06 for ; Fri, 21 Oct 2005 12:40:34 +0000 (GMT) Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by svr1.postgresql.org (Postfix) with ESMTP id 4D4DAD904F for ; Fri, 21 Oct 2005 09:40:35 -0300 (ADT) Received: from sesse by cassarossa.samfundet.no with local (Exim 4.50) id 1ESwCM-0000sw-HD for pgsql-performance@postgresql.org; Fri, 21 Oct 2005 14:40:38 +0200 Date: Fri, 21 Oct 2005 14:40:38 +0200 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Subject: Re: What gets cached? Message-ID: <20051021124038.GA1928@samfundet.no> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 required=5 tests=[AWL=0.011] X-Spam-Level: X-Archive-Number: 200510/296 X-Sequence-Number: 15064 On Fri, Oct 21, 2005 at 07:34:30AM -0500, Martin Nickel wrote: > Let's say I do the same thing in Postgres. I'm likely to have my very > fastest performance for the first few queries until memory gets filled up. > The only time Postgres seems to take advantage of cached data is when I > repeat the same (or substantially the same) query. I don't know of any > way to view what is actually cached at any point in time, but it seems > like "most recently used" rather than "most frequently used". What version are you using? There have been significant improvements to the buffer manager in the last few versions. Most of the caching is done by your OS, though, so that would probably influence the results quite a bit. /* Steinar */ -- Homepage: http://www.sesse.net/