Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id CA05D9F96DE for ; Sat, 11 Aug 2007 12:54:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 67708-08 for ; Sat, 11 Aug 2007 12:54:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 7E1FB9F97BE for ; Sat, 11 Aug 2007 12:54:09 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 4037131418; Sat, 11 Aug 2007 17:54:08 +0200 (MET DST) From: Detlef Rudolph X-Newsgroups: pgsql.performance Subject: Re: select count(*) performance Date: Sat, 11 Aug 2007 17:54:41 +0200 Lines: 9 Message-ID: <5i64cvF3mnmcsU1@mid.individual.net> References: <1186578085.034463.116030@q75g2000hsh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cancel-Lock: sha1:mimwnZ7kugbL/wj6Lk+EUEHDYkM= User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) In-Reply-To: <1186578085.034463.116030@q75g2000hsh.googlegroups.com> To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.75 tagged_above=0 required=5 tests=AWL=-1.750, BAYES_99=3.5 X-Spam-Level: * X-Archive-Number: 200708/181 X-Sequence-Number: 26311 Hello Group, I've tried the VACUUM ANALYSE, that doesn't help much, but VACUUM FULL improves Performance down from about 40 secs to 8. I think in future I would use the reltuples value from pg_class for the table. Thanks a lot for your answers and a good Sunday, Det