Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A5ED39FB582 for ; Tue, 23 Jan 2007 06:44:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 43088-08 for ; Tue, 23 Jan 2007 06:44:46 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 250659FB22C for ; Tue, 23 Jan 2007 06:44:50 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by svr4.postgresql.org (Postfix) with ESMTP id 29D665AF9EC for ; Tue, 23 Jan 2007 10:44:49 +0000 (GMT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l0NAilWj022630 for ; Tue, 23 Jan 2007 05:44:47 -0500 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l0NAikaD012968 for ; Tue, 23 Jan 2007 05:44:47 -0500 Received: from [172.31.7.7] (vpn-4-67.str.redhat.com [10.32.4.67]) by pobox.stuttgart.redhat.com (8.12.8/8.12.8) with ESMTP id l0NAikaK031184 for ; Tue, 23 Jan 2007 11:44:46 +0100 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <5.0.2.1.2.20070123113422.00d189e8@pop.univ-montp2.fr> References: <5.0.2.1.2.20070123113422.00d189e8@pop.univ-montp2.fr> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <08E18820-41DF-4170-A39E-B5DFAAF1C690@redhat.com> Content-Transfer-Encoding: 7bit From: "Heiko W.Rupp" Subject: Re: slow result Date: Tue, 23 Jan 2007 11:43:16 +0100 To: pgsql-performance@postgresql.org X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.143 tagged_above=0 required=5 tests=BAYES_50, SPF_FAIL X-Spam-Level: * X-Archive-Number: 200701/340 X-Sequence-Number: 22941 Am 23.01.2007 um 11:34 schrieb Laurent Manchon: > Hi, > > I have a slow response of my PostgreSQL database 7.4 using this > query below > on a table with 800000 rows: > > select count(*)from tbl; count(*) is doing a full tablescan over all your 800000 rows. This is a well known "feature" of postgres :-/ So enhancing the performance is currently only possible by having faster disk drives. -- Heiko W.Rupp heiko.rupp@redhat.com, http://www.dpunkt.de/buch/ 3-89864-429-4.html