From: Greg Smith <greg@2ndquadrant.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: fernando.mertins@gmail.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Same stament sometime fast, something slow
Date: Tue, 04 Jan 2011 20:51:49 -0500
Message-ID: <4D23CEB5.2090406@2ndquadrant.com> (raw)
In-Reply-To: <4D230EBD0200002500038FBB@gw.wicourts.gov>
References: <4D230EBD0200002500038FBB@gw.wicourts.gov>
Kevin Grittner wrote:
> Two common causes for this are blocking and overloading the I/O
> system at checkpoint. You might want to turn on logging of
> checkpoints to see if this happens only during checkpoints. See this
> page for techniques to look at blocking:
>
> http://wiki.postgresql.org/wiki/Lock_Monitoring
>
I just updated this to mention use of log_lock_waits to help here.
Looking for patterns in log_min_duration_statement, log_checkpoints, and
log_lock_waits entries, seeing which tend to happen at the same time, is
the usual helpful trio to investigate when having intermittent slow
queries. Of course, with Windows running on a VM, there's a hundred
other things that could be causing this completely unrelated to the
database.
--
Greg Smith 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: greg@2ndquadrant.com, Kevin.Grittner@wicourts.gov, fernando.mertins@gmail.com
Subject: Re: Same stament sometime fast, something slow
In-Reply-To: <4D23CEB5.2090406@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox