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 C806DD1B4F2 for ; Mon, 15 Sep 2003 21:35:37 +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 35756-09 for ; Mon, 15 Sep 2003 18:35:04 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 79B01D1B4EE for ; Mon, 15 Sep 2003 18:35:02 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 69F6E35244; Mon, 15 Sep 2003 14:34:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 68D5635240; Mon, 15 Sep 2003 14:34:49 -0700 (PDT) Date: Mon, 15 Sep 2003 14:34:49 -0700 (PDT) From: Stephan Szabo To: Joseph Bove Cc: pgsql-performance@postgresql.org Subject: Re: Inconsistent performance In-Reply-To: <5.1.0.14.2.20030915172334.00b1fe48@mail.vetstar.com> Message-ID: <20030915143308.S75006@megazone.bigpanda.com> References: <5.1.0.14.2.20030915172334.00b1fe48@mail.vetstar.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/219 X-Sequence-Number: 3585 On Mon, 15 Sep 2003, Joseph Bove wrote: > I am working with a decent sized database on an extremely powerful machine. > The specs follow: > > OS: RedHat Linux 9.0 > PG Version 7.3 > Memory 1 gig > CPU Quad Processor - Unsure of exact CPUs > Hard Drive 80 gigs > Database Size 2 gigs > > > As you can see the server is built for overkill. > > The problem that I see is as follows. > > 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. Is it consistant for various values of "some value"? If so, it's possible that it's switching plans based on the apparent selectivity of the column for that value.