Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 12C769FBF30 for ; Tue, 15 May 2007 19:50:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 44226-06 for ; Tue, 15 May 2007 19:50:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id CAA019FBF4B for ; Tue, 15 May 2007 19:50:40 -0300 (ADT) Received: from perhan.alvh.no-ip.org (201-221-217-243.bk12-dsl.surnet.cl [201.221.217.243]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l4FMoYAU026479; Tue, 15 May 2007 15:50:36 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6CB5032A13; Tue, 15 May 2007 18:50:29 -0400 (CLT) Date: Tue, 15 May 2007 18:50:29 -0400 From: Alvaro Herrera To: Y Sidhu Cc: pgsql-performance@postgresql.org Subject: Re: How to Run a pg_stats Query Message-ID: <20070515225029.GU12731@alvh.no-ip.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 15 May 2007 15:50:36 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/277 X-Sequence-Number: 24667 Y Sidhu escribió: > I turned on all the stats in the conf file (below) and restarted the server. > Question is, what's the name of the database and how do I run a simple > select query? > > stats_start_collector = true > stats_command_string = true > stats_block_level = true > stats_row_level = true > stats_reset_on_server_start = true Stats are present on all databases. As for the name of the tables, try pg_stat_user_tables and pg_stat_activity for starters. There are a lot more; check the documentation or a \d pg_stat* in psql. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support