Re: Two servers - One Replicated - Same query

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Pam Ozer" <pozer(at)automotive(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Two servers - One Replicated - Same query
Date: 2011-04-12 14:32:46
Message-ID: 4DA41C3E020000250003C6DC@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Ozer, Pam" <pozer(at)automotive(dot)com> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2011-04-12 14:38:27 Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?
Previous Message Merlin Moncure 2011-04-12 13:24:34 Re: Linux: more cores = less concurrency.