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 03B92D1B4F0 for ; Mon, 15 Sep 2003 22:12:10 +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 46763-03 for ; Mon, 15 Sep 2003 19:12:01 -0300 (ADT) Received: from merlin (merlin.warpdrive.net [24.56.130.4]) by svr1.postgresql.org (Postfix) with ESMTP id 0FA73D1B522 for ; Mon, 15 Sep 2003 19:11:59 -0300 (ADT) Received: from mail.warpdrive.net ([24.56.130.6] helo=mail.vetstar.com) by merlin with esmtp (Exim 4.14) id 19z1Zh-0003e1-W4 for pgsql-performance@postgresql.org; Mon, 15 Sep 2003 18:12:01 -0400 Received: from sirius.vetstar.com [66.88.86.217] by mail.vetstar.com with ESMTP (SMTPD32-8.02) id A90233B00A6; Mon, 15 Sep 2003 18:11:14 -0400 Message-Id: <5.1.0.14.2.20030915182422.00a8a2d8@mail.vetstar.com> X-Sender: jbove@vetstar.com@mail.vetstar.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 15 Sep 2003 18:24:27 -0400 To: pgsql-performance@postgresql.org From: Joseph Bove Subject: Re: Inconsistent performance Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/222 X-Sequence-Number: 3588 Stephan, Actually, it's inconsistent with the exact same command. I've now replicated the problem by doing the following command: select count (*) from table; The table in question has 88899 rows. The response time is anywhere from 1 second to 12 seconds. Different response times can occur in the same minute of testing! Regards, Joseph At 02:34 PM 9/15/2003 -0700, you wrote: >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.