Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id CEAF42E0038 for ; Wed, 16 Apr 2008 01:07:15 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 30512-08 for ; Wed, 16 Apr 2008 01:07:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from secure.socket.ch (secure.socket.ch [212.103.70.36]) by developer.postgresql.org (Postfix) with ESMTP id 9C2442E0037 for ; Wed, 16 Apr 2008 01:07:08 -0300 (ADT) Received: from 84-75-214-202.dclient.hispeed.ch ([84.75.214.202] helo=macbook.internal.loc) by secure.socket.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1JlyvI-0008sC-PW; Wed, 16 Apr 2008 06:07:06 +0200 Cc: pgsql-performance@postgresql.org Message-Id: From: Thomas Spreng To: PFC In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Oddly slow queries Date: Wed, 16 Apr 2008 06:07:04 +0200 References: <3D7728ED-3D36-47E6-9266-351073ED4E11@socket.ch> X-Mailer: Apple Mail (2.919.2) X-SA-Exim-Connect-IP: 84.75.214.202 X-SA-Exim-Mail-From: spreng@socket.ch X-SA-Exim-Scanned: No (on secure.socket.ch); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200804/197 X-Sequence-Number: 29690 On 16.04.2008, at 01:24, PFC wrote: > >> The queries in question (select's) occasionally take up to 5 mins >> even if they take ~2-3 sec under "normal" conditions, there are no >> sequencial scans done in those queries. There are not many users >> connected (around 3, maybe) to this database usually since it's >> still in a testing phase. I tried to hunt down the problem by >> playing around with resource usage cfg options but it didn't really >> made a difference. > > Could that be caused by a CHECKPOINT ? actually there are a few log (around 12 per day) entries concerning checkpoints: LOG: checkpoints are occurring too frequently (10 seconds apart) HINT: Consider increasing the configuration parameter "checkpoint_segments". But wouldn't that only affect write performance? The main problems I'm concerned about affect SELECT queries. Regards, Tom PS: WAL settings are all set to defaults.