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 A7673D9CA3 for ; Fri, 21 Oct 2005 09:24:21 -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 43196-01 for ; Fri, 21 Oct 2005 12:24:17 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id BF567D904F for ; Fri, 21 Oct 2005 09:24:17 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 0D7DF31059; Fri, 21 Oct 2005 14:24:17 +0200 (MET DST) From: Martin Nickel X-Newsgroups: pgsql.performance Subject: What gets cached? Date: Fri, 21 Oct 2005 07:34:30 -0500 Organization: Hub.Org Networking Services Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@news.hub.org User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) To: pgsql-performance@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/295 X-Sequence-Number: 15063 I was reading a comment in another posting and it started me thinking about this. Let's say I startup an Oracle server. All my queries are a little bit (sometimes a lot bit) slow until it gets its "normal" things in memory, then it's up to speed. The "normal" things would include some small lookup tables and the indexes for the most frequently used tables. 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". Does this seem true? s