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