X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C40CE9DCA1F for ; Mon, 27 Mar 2006 09:34:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59243-06 for ; Mon, 27 Mar 2006 09:34:31 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 4D5E49DCD1D for ; Mon, 27 Mar 2006 09:34:26 -0400 (AST) Received: from smarty.gabriel.co.hu (smarty.gabriel.co.hu [195.70.37.16]) by svr4.postgresql.org (Postfix) with ESMTP id EC35E5AF86D for ; Mon, 27 Mar 2006 13:34:30 +0000 (GMT) Received: from localhost (smarty [127.0.0.1]) by smarty.gabriel.co.hu (Postfix) with ESMTP id A8022417A3 for ; Mon, 27 Mar 2006 15:34:24 +0200 (CEST) Received: from smarty.gabriel.co.hu ([127.0.0.1]) by localhost (smarty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10929-02-5 for ; Mon, 27 Mar 2006 15:34:24 +0200 (CEST) Received: from [192.168.111.135] (customer-174.radio-net.hu [217.113.54.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smarty.gabriel.co.hu (Postfix) with ESMTP id 68FDE41798 for ; Mon, 27 Mar 2006 15:34:24 +0200 (CEST) Message-ID: <4427E9E8.9030806@i-logic.hu> Date: Mon, 27 Mar 2006 15:34:32 +0200 From: =?ISO-8859-2?Q?G=E1briel_=C1kos?= Organization: I-Logic Kft User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: count(*) performance Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at gabriel.co.hu X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/518 X-Sequence-Number: 17955 Hi, I guess this is an age-old 100times answered question, but I didn't find the answer to it yet (neither in the FAQ nor in the mailing list archives). Question: I have a table with 2.5M rows. count(*) on this table is running 4 minutes long. (dual opteron, 4gig ram, db on 4 disk raid10 array (sata, not scsi)) Is this normal? How could I make it run faster? Maybe make it run faster for the 2nd time? Which parameters should I change in postgresql.conf and how? -- Üdvözlettel, Gábriel Ákos -=E-Mail :akos.gabriel@i-logic.hu|Web: http://www.i-logic.hu=- -=Tel/fax:+3612367353 |Mobil:+36209278894 =-