Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id BE4C72E0099 for ; Fri, 2 May 2008 11:10:21 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 91196-01-2 for ; Fri, 2 May 2008 11:10:00 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by developer.postgresql.org (Postfix) with ESMTP id 056E72E0073 for ; Fri, 2 May 2008 11:09:50 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so906610rvf.43 for ; Fri, 02 May 2008 07:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=rlEBzVcQJEc5r+XN3RfrcbgpiiCGI70acid/j8zAPek=; b=DOd33a8iHWeh8ADVWcvGEFxNz/Quzl+/nQ2GlXVy0cxhd479r7lFym5QeWYiD9rhSNrwwV2PJ+iRdyhjyr8uRYsBJ2CCzThnN8CYMbH5ne6p9qFOcS/GI2CptTIq+r4sex6NUeCThWH8Ygg+hq0rfuurGDkpyZoWnb31hImsJQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=CXFElY05yEGEMGZWUz5EaHub7FEF7NJh2ejFZPiesIHy8HRTKrQPMusHTRwwG3p8xqWJMank/Fq8iQMO4tCqoVYYl10/0YnIRr7dJsEKVamlkF9hbAw2t3iV+5e9n0f94sUuXf9cec2hTR8sSq9YbzV9dlCHSSG9qq1vRsSYZnQ= Received: by 10.141.49.6 with SMTP id b6mr1367197rvk.223.1209737389376; Fri, 02 May 2008 07:09:49 -0700 (PDT) Received: by 10.141.44.10 with HTTP; Fri, 2 May 2008 07:09:49 -0700 (PDT) Message-ID: Date: Fri, 2 May 2008 10:09:49 -0400 From: chirag.dave@gmail.com To: "Francisco Reyes" Subject: Re: Vacuum statistics Cc: "Pgsql performance" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_8499_11054492.1209737389377" References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200805/12 X-Sequence-Number: 29980 ------=_Part_8499_11054492.1209737389377 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline What version of Postgres you are running ? If you are using 8.3, you can use pg_stat_all_tables.If Not you can use http://www.postgresql.org/docs/current/static/pgstattuple.html Chirag On Tue, Apr 29, 2008 at 8:14 AM, Francisco Reyes wrote: > I recall reading posts in the past where one could query the stat tables > and see how well autovacuum was performing. Not finding the posts. > > > I found this query: > SELECT relname, relkind, reltuples, relpages FROM pg_class where relkind = > 'r'; > > From the output how can I tell the number of dead tuples? Or how effective > autovacuum is in the particular table.. > > Recently inheritted several large Postgresql DBs (tables in the hundreds > of millions and some tables over a billion rows) and I am just starting to > go over them and see how autovacuum has been performing. > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > ------=_Part_8499_11054492.1209737389377 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline What version of Postgres you are running ?

If you are using 8.3, you can use pg_stat_all_tables.If Not you can use http://www.postgresql.org/docs/current/static/pgstattuple.html

Chirag

On Tue, Apr 29, 2008 at 8:14 AM, Francisco Reyes <lists@stringsutils.com> wrote:
I recall reading posts in the past where one could query the stat tables and see how well autovacuum was performing. Not finding the posts.


I found this query:
SELECT relname, relkind, reltuples, relpages FROM pg_class where relkind = 'r';

From the output how can I tell the number of dead tuples? Or how effective autovacuum is in the particular table..

Recently inheritted several large Postgresql DBs (tables in the hundreds of millions and some tables over a billion rows) and I am just starting to go over them and see how autovacuum has been performing.


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

------=_Part_8499_11054492.1209737389377--