X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8B04ED1B8D2 for ; Wed, 27 Aug 2003 23:39:43 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 77319-03 for ; Wed, 27 Aug 2003 20:39:14 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5731BD1B8AB for ; Wed, 27 Aug 2003 20:39:11 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h7RNd95H028673; Wed, 27 Aug 2003 19:39:09 -0400 (EDT) To: "Anders K. Pedersen" Cc: pgsql-performance@postgresql.org Subject: Re: Queries sometimes take 1000 times the normal time In-reply-to: References: Comments: In-reply-to "Anders K. Pedersen" message dated "Thu, 28 Aug 2003 01:07:05 +0200" Date: Wed, 27 Aug 2003 19:39:08 -0400 Message-ID: <28672.1062027548@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/361 X-Sequence-Number: 3177 "Anders K. Pedersen" 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