Re: measure database contention - Mailing list pgsql-performance

From Robert Haas
Subject Re: measure database contention
Date
Msg-id 603c8f070812170618g3116a90du94cbf102f0336d59@mail.gmail.com
Whole thread Raw
In response to measure database contention  ("Jaime Casanova" <jcasanov@systemguards.com.ec>)
Responses Re: measure database contention
List pgsql-performance
On Tue, Dec 16, 2008 at 2:32 PM, Jaime Casanova
<jcasanov@systemguards.com.ec> wrote:
> 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?

Is it the exact same query?  Sometimes you might find that the query
plan changes depending on the particular values you have in there; it
is worth running "EXPLAIN ANALYZE" to look for such cases.

You might also want to look at pg_locks.

...Robert

pgsql-performance by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: measure database contention
Next
From: "Merlin Moncure"
Date:
Subject: Re: measure database contention