Skip site navigation (1) Skip section navigation (2)

Re: VERY slow queries at random

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: VERY slow queries at random
Date: 2007-06-07 15:45:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Thu, Jun 07, 2007 at 04:22:47PM +0200, Gunther Mayer wrote:
> There are a whole bunch of update queries that fire all the time but 
> afaik none of them ever lock the entire table. To the best of my 
> knowledge UPDATE ... WHERE ... only locks those rows that it actually 
> operates on, in my case this is always a single row.

Well that shouldn't be biting you, then (you're not in SERIALIZABLE
mode, right?).  The other obvious bit would be checkpoint storms. 
What's your bgwriter config like?

> Question is, how do I find out about locks at the time when I only get 
> told about the slow query *after* it has completed and postgres has told 
> me so by logging a slow query entry in my logs?

You can't :(


Andrew Sullivan  | ajs(at)crankycanuck(dot)ca
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well. 
		--Dennis Ritchie

In response to

pgsql-performance by date

Next:From: Alvaro HerreraDate: 2007-06-07 15:58:12
Subject: Re: VERY slow queries at random
Previous:From: Gunther MayerDate: 2007-06-07 15:38:05
Subject: Re: VERY slow queries at random

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group