Re: Same stament sometime fast, something slow

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: fernando(dot)mertins(at)gmail(dot)com, pgsql-performance(at)postgresql(dot)org
Subject: Re: Same stament sometime fast, something slow
Date: 2011-01-05 01:51:49
Message-ID: 4D23CEB5.2090406@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services and Support www.2ndQuadrant.us
"PostgreSQL 9.0 High Performance": http://www.2ndQuadrant.com/books

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Carey 2011-01-05 06:41:20 Re: Question: BlockSize > 8192 with FusionIO
Previous Message Craig Ringer 2011-01-05 01:24:19 Re: Same stament sometime fast, something slow