Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 1CF3C9FC1E8 for ; Thu, 7 Jun 2007 16:42:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 83625-02 for ; Thu, 7 Jun 2007 16:42:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from westnet.com (westnet.com [216.187.52.2]) by postgresql.org (Postfix) with ESMTP id DD6359FC1DF for ; Thu, 7 Jun 2007 16:42:42 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id l57Jggr3003915; Thu, 7 Jun 2007 15:42:42 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id l57Jgfej003912; Thu, 7 Jun 2007 15:42:41 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Thu, 7 Jun 2007 15:42:41 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Gunther Mayer cc: pgsql-performance@postgresql.org Subject: Re: VERY slow queries at random In-Reply-To: <4668265D.2010200@gmail.com> Message-ID: References: <46670916.9090505@gmail.com> <466726D3.7050102@g2switchworks.com> <4668265D.2010200@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/141 X-Sequence-Number: 25174 On Thu, 7 Jun 2007, Gunther Mayer wrote: > wal checkpoint config is on pg defaults everywhere, all relevant config > options are commented out. I'm no expert in wal stuff but I don't see how > that could cause the problem? Checkpoints are very resource intensive and can cause other processes (including your selects) to hang for a considerable period of time while they are processing. With the default parameters, they can happen very frequently. Normally checkpoint_segments and checkpoint_timeout are increased in order to keep this from happening. This would normally be an issue only if you're writing a substantial amount of data to your tables. If there are a lot of writes going on, you might get some improvement by adjusting those parameters upward; the defaults are pretty low. Make sure you read http://www.postgresql.org/docs/8.2/static/wal-configuration.html first so you know what you're playing with, there are some recovery implications invoved. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD