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 1842FD1B510 for ; Mon, 15 Sep 2003 21:36:22 +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 42490-07 for ; Mon, 15 Sep 2003 18:35:52 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 487C5D1B4E5 for ; Mon, 15 Sep 2003 18:35:49 -0300 (ADT) Received: (qmail 17665 invoked by uid 500); 15 Sep 2003 21:42:28 -0000 Date: Mon, 15 Sep 2003 16:42:28 -0500 From: Bruno Wolff III To: Joseph Bove Cc: pgsql-performance@postgresql.org Subject: Re: Inconsistent performance Message-ID: <20030915214228.GA17642@wolff.to> Mail-Followup-To: Joseph Bove , pgsql-performance@postgresql.org References: <5.1.0.14.2.20030915172334.00b1fe48@mail.vetstar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20030915172334.00b1fe48@mail.vetstar.com> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/220 X-Sequence-Number: 3586 On Mon, Sep 15, 2003 at 17:34:12 -0400, Joseph Bove wrote: > > I do a rather simple query: select count (*) from large-table where column > = some value; > > About 80% of the time, the response time is sub-second. However, at 10% of > the time, the response time is 5 - 10 seconds. > > This is nothing readily apparent at the system level that comes close to > explaining the performance hits. CPU and memory usage (as measured by top) > appear to be fine. > > Although there are certain tuning issues within the database itself, no > documentation I have seen seems to indicate that tuning issues would lead > to such inconsistent response time. Looking at the output from explain analyze for the query would be useful. It may be that there are a lot of rows that have the value in the problem queries.