Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 93EA41337B9C for ; Tue, 12 Apr 2011 11:33:12 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 45758-03-2 for ; Tue, 12 Apr 2011 14:32:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 63AF71337BB7 for ; Tue, 12 Apr 2011 11:32:50 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 12 Apr 2011 09:32:50 -0500 Message-Id: <4DA41C3E020000250003C6DC@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 12 Apr 2011 09:32:46 -0500 From: "Kevin Grittner" To: "Pam Ozer" , Subject: Re: Two servers - One Replicated - Same query References: <216FFB77CBFAEE4B8EE4DF0A939FF1D14F858B@mail-001.corp.automotive.com> In-Reply-To: <216FFB77CBFAEE4B8EE4DF0A939FF1D14F858B@mail-001.corp.automotive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.409 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, SARE_SPEC_REPLICA=0.72, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: ** X-Archive-Number: 201104/157 X-Sequence-Number: 43219 "Ozer, Pam" wrote: > I have two servers one has replication the other does not. The > same query on both servers. One takes 225seconds on the > replicated server the first time it runs and only 125ms on the > other server the first time it runs. The second time you execute > the query it drops to the 125ms. They are using the same query > plan. What kind of things should I be looking at? Caching. Apparently the usage pattern on one server tends to keep the necessary data in cache, while the usage pattern on the other is flushing it out occasionally to make room for other data. Adding RAM to the server might help. -Kevin