Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id DA7CE9FB22E for ; Tue, 16 Jan 2007 15:24:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 67909-02 for ; Tue, 16 Jan 2007 15:24:26 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 6B7A19FB203 for ; Tue, 16 Jan 2007 15:24:33 -0400 (AST) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 8AFEE76426; Tue, 16 Jan 2007 19:24:32 +0000 (GMT) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 541F3274680; Tue, 16 Jan 2007 19:24:32 +0000 (GMT) Message-ID: <45AD2670.7050509@archonet.com> Date: Tue, 16 Jan 2007 19:24:32 +0000 From: Richard Huxton User-Agent: IceDove 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: Gauri Kanekar Cc: pgsql-performance@postgresql.org Subject: Re: Table Size References: <7e4ba9550701160548v4980393buba8bbf6926e2b0a0@mail.gmail.com> In-Reply-To: <7e4ba9550701160548v4980393buba8bbf6926e2b0a0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/243 X-Sequence-Number: 22844 Gauri Kanekar wrote: > Hi, > > Can anybody help me out to get following info of all the tables in a > database. 1. Have you read up on the information schema and system catalogues? http://www.postgresql.org/docs/8.2/static/catalogs.html http://www.postgresql.org/docs/8.2/static/catalogs.html > table_len > tuple_count > tuple_len 2. Not sure what the difference is between "len" and "count" here. > tuple_percent 3. Or what this "percent" refers to. > dead_tuple_count > dead_tuple_len > dead_tuple_percent > free_space > free_percent 4. You might find some of the stats tables useful too: http://www.postgresql.org/docs/8.2/static/monitoring-stats.html -- Richard Huxton Archonet Ltd