Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2C1D1B5DBD9 for ; Wed, 5 Oct 2011 06:40:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 62856-03 for ; Wed, 5 Oct 2011 09:40:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from kolab.mnc.ch (62-2-77-205.static.cablecom.ch [62.2.77.205]) by mail.postgresql.org (Postfix) with ESMTP id 9FBA6B5DBEE for ; Wed, 5 Oct 2011 06:40:02 -0300 (ADT) Received: from localhost (kolab.op.lan [127.0.0.1]) by kolab.mnc.ch (Postfix) with ESMTP id 1E4126CFA1; Wed, 5 Oct 2011 11:40:01 +0200 (CEST) X-Virus-Scanned: by amavisd-new at mnc.ch Received: from kolab.mnc.ch ([127.0.0.1]) by localhost (kolab.mnc.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sDutwEaRgAyh; Wed, 5 Oct 2011 11:40:00 +0200 (CEST) Received: from localhost (kolab.op.lan [127.0.0.1]) by kolab.mnc.ch (Postfix) with ESMTP id 00DB06D347; Wed, 5 Oct 2011 11:39:59 +0200 (CEST) Received: from gc.localdomain (62-2-77-204.static.cablecom.ch [62.2.77.204]) by kolab.mnc.ch (Postfix) with ESMTP id 7008C6CFA1; Wed, 5 Oct 2011 11:39:59 +0200 (CEST) Received: by gc.localdomain (Postfix, from userid 500) id BF97118A21A; Wed, 5 Oct 2011 11:39:58 +0200 (CEST) To: Venkat Balaji Cc: PGSQL Performance Subject: Re: : Performance Improvement Strategy References: <4E79E091.2030401@peak6.com> From: Guillaume Cottenceau X-Hashcash: 1:21:111005:venkat.balaji@verse.in::/kCIO2CbJolGVM/B:000000000000000000000000000000000000000OT0+ X-Hashcash: 1:21:111005:pgsql-performance@postgresql.org::9r55F/w3m7WVKADv:00000000000000000000000000000J4fU Date: Wed, 05 Oct 2011 11:39:58 +0200 In-Reply-To: (Venkat Balaji's message of "Wed\, 5 Oct 2011 14\:38\:43 +0530") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/58 X-Sequence-Number: 45280 Venkat Balaji writes: > Hello, > > I was attempting to calculate the actual occupied space by a Table. SELECT relname, reltuples, pg_size_pretty(relpages*8*1024) as size FROM pg_class, pg_namespace WHERE pg_namespace.oid = pg_class.relnamespace AND relkind = 'r' AND nspname = 'public' ORDER BY relpages DESC; relkind = 'i' for indexes. -- Guillaume Cottenceau