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

Re: Queries sometimes take 1000 times the normal time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Anders K(dot) Pedersen" <akp(at)cohaesio(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Queries sometimes take 1000 times the normal time
Date: 2003-08-27 23:39:08
Message-ID: 28672.1062027548@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
"Anders K. Pedersen" <akp(at)cohaesio(dot)com> writes:
> Currently there's only a few users in the database for testing purposes, 
> and most of the time the user lookup's take 2-3 ms (I have syslog'ing of 
> queries and duration turned on), but several times per hour the duration 
> for one of the queries is 2-3 seconds (1000 times larger), while the 
> surrounding lookups take the usual 2-3 ms.

One thing that comes to mind is that the slow query could be occurring
at the same time as a checkpoint, or some other cycle-chewing background
operation.  It's not clear why a checkpoint would slow things down that
much, though.  Anyway I'd suggest looking for such activities; once we
know if that's the issue or not, we can make some progress.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Neil ConwayDate: 2003-08-28 00:11:19
Subject: Re: Simple queries take forever to run
Previous:From: Anders K. PedersenDate: 2003-08-27 23:07:05
Subject: Queries sometimes take 1000 times the normal time

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