Re: Two servers - One Replicated - Same query - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Two servers - One Replicated - Same query
Date
Msg-id 4DA41C3E020000250003C6DC@gw.wicourts.gov
Whole thread Raw
In response to Two servers - One Replicated - Same query  ("Ozer, Pam" <pozer@automotive.com>)
List pgsql-performance
"Ozer, Pam" <pozer@automotive.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

pgsql-performance by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Linux: more cores = less concurrency.
Next
From: Tom Lane
Date:
Subject: Re: performance problem with LIMIT (order BY in DESC order). Wrong index used?