Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 553E19F96A6 for ; Mon, 13 Aug 2007 08:38:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 18314-07 for ; Mon, 13 Aug 2007 08:38:06 -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 8C2CA9F935F for ; Mon, 13 Aug 2007 08:38:12 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id D80B831418; Mon, 13 Aug 2007 13:38:09 +0200 (MET DST) From: valgog X-Newsgroups: pgsql.performance Subject: Re: select count(*) performance Date: Mon, 13 Aug 2007 11:38:09 -0000 Organization: http://groups.google.com Lines: 17 Message-ID: <1187005089.011403.303320@w3g2000hsg.googlegroups.com> References: <1186578085.034463.116030@q75g2000hsh.googlegroups.com> <5i64cvF3mnmcsU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Complaints-To: groups-abuse@google.com In-Reply-To: <5i64cvF3mnmcsU1@mid.individual.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: w3g2000hsg.googlegroups.com; posting-host=85.178.202.139; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.082 tagged_above=0 required=5 tests=AWL=0.081, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/124 X-Sequence-Number: 26254 On Aug 11, 5:54 pm, Detlef Rudolph wrote: > 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 just do not forget, that reltuples is count and updated in pg_class only during the vacuuming or analyzing of a table... so the value is only an APPROXIMATE.... -- Valentine