pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: psql performance list <pgsql-performance@postgresql.org>
Subject: Re: measure database contention
Date: Wed, 17 Dec 2008 09:49:26 -0500
Message-ID: <b42b73150812170649rd0a689bw41b8215d8488f9b4@mail.gmail.com> (raw)
In-Reply-To: <3073cc9b0812161132w3ae157a8n69e2b0cccea05ca2@mail.gmail.com>
References: <3073cc9b0812161132w3ae157a8n69e2b0cccea05ca2@mail.gmail.com>

On Tue, Dec 16, 2008 at 2:32 PM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> Hi,
>
> we have a some bad queries (developers are working on that), some of
> them run in 17 secs and that is the average but when analyzing logs i
> found that from time to time some of them took upto 3 mins (the same
> query that normally runs in 17secs).
>
> so my question is: how could i look for contention problems?

Sometimes queries can have fluctuating plans.  For example this can
happen if you have sorts or hashes that are very near the allowed
limit set in work_mem.  so you want to catch it both ways via explain
analyze.

merlin



view thread (10+ messages)  latest in thread

Message-ID: <b42b73150812170649rd0a689bw41b8215d8488f9b4@mail.gmail.com>
Permalink:  ../b42b73150812170649rd0a689bw41b8215d8488f9b4@mail.gmail.com/
Also on:    postgresql.org/message-id/b42b73150812170649rd0a689bw41b8215d8488f9b4@mail.gmail.com

 · 

reply

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: mmoncure@gmail.com, jcasanov@systemguards.com.ec
  Subject: Re: measure database contention
  In-Reply-To: <b42b73150812170649rd0a689bw41b8215d8488f9b4@mail.gmail.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