X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D0925D1CCDA for ; Thu, 15 Apr 2004 04:53:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 04793-02 for ; Thu, 15 Apr 2004 04:53:35 -0300 (ADT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id AB4E2D1CCB0 for ; Thu, 15 Apr 2004 04:53:33 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1BE1gk-000Pgu-0U; Thu, 15 Apr 2004 08:53:34 +0100 Received: from client17.archonet.com (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 221CB1624A; Thu, 15 Apr 2004 08:53:33 +0100 (BST) From: Richard Huxton To: Rajesh Kumar Mallah Subject: Re: select count(*) very slow on an already vacuumed table. Date: Thu, 15 Apr 2004 08:53:32 +0100 User-Agent: KMail/1.5 Cc: Postgres Performance References: <407D7A89.60508@trade-india.com> <200404142008.58533.dev@archonet.com> <407E3563.6000408@trade-india.com> In-Reply-To: <407E3563.6000408@trade-india.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404150853.32475.dev@archonet.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/170 X-Sequence-Number: 6470 On Thursday 15 April 2004 08:10, Rajesh Kumar Mallah wrote: > The problem is that i want to know if i need a Hardware upgrade > at the moment. > > Eg i have another table rfis which contains ~ .6 million records. > SELECT count(*) from rfis where sender_uid > 0; > Time: 117560.635 ms > > Which is approximate 4804 records per second. Is it an acceptable > performance on the hardware below: > > RAM: 2 GB > DISKS: ultra160 , 10 K , 18 GB > Processor: 2* 2.0 Ghz Xeon Hmm - doesn't seem good, does it? If you run it again, is it much faster (since the data should be cached then)? What does "vmstat 10" show while you're running the query? One thing you should have done is read the performance tuning guide at: http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php The default values are very conservative, and you will need to change them. > What kind of upgrades shoud be put on the server for it to become > reasonable fast. If you've only got one disk, then a second disk for OS/logging. Difficult to say more without knowing numbers of users/activity etc. -- Richard Huxton Archonet Ltd