Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1161A9FB5A6 for ; Tue, 23 Jan 2007 06:55:43 -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 47355-04 for ; Tue, 23 Jan 2007 06:55:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from cassarossa.samfundet.no (cassarossa.samfundet.no [129.241.93.19]) by postgresql.org (Postfix) with ESMTP id 624349FB298 for ; Tue, 23 Jan 2007 06:55:39 -0400 (AST) Received: from trofast.sesse.net ([129.241.93.32]) by cassarossa.samfundet.no with esmtp (Exim 4.50) id 1H9JJO-0001q0-JX; Tue, 23 Jan 2007 11:55:34 +0100 Received: from sesse by trofast.sesse.net with local (Exim 3.36 #1 (Debian)) id 1H9JJV-0003Ua-00; Tue, 23 Jan 2007 11:55:41 +0100 Date: Tue, 23 Jan 2007 11:55:41 +0100 From: "Steinar H. Gunderson" To: pgsql-performance@postgresql.org Cc: Laurent Manchon Subject: Re: slow result Message-ID: <20070123105541.GA13367@uio.no> Mail-Followup-To: pgsql-performance@postgresql.org, Laurent Manchon References: <5.0.2.1.2.20070123113422.00d189e8@pop.univ-montp2.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5.0.2.1.2.20070123113422.00d189e8@pop.univ-montp2.fr> X-Operating-System: Linux 2.6.19 on a x86_64 X-Message-Flag: Outlook? --> http://www.mozilla.org/products/thunderbird/ User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/342 X-Sequence-Number: 22943 On Tue, Jan 23, 2007 at 11:34:52AM +0100, Laurent Manchon wrote: > 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; Contrary to your expectations, this is _not_ a query you'd expect to be fast in Postgres. Try real queries from your application instead -- most likely, you'll find them to be much master. (If not, come back with the query, the schema and the EXPLAIN ANALYZE output of your query, and you'll usually get help nailing down the issues. :-) ) /* Steinar */ -- Homepage: http://www.sesse.net/