X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5F1CA53418 for ; Fri, 22 Apr 2005 19:28:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 90257-09 for ; Fri, 22 Apr 2005 22:28:17 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 7FDAB5341F for ; Fri, 22 Apr 2005 19:28:16 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [64.81.245.111] (account josh@agliodbs.com HELO temoku.sf.agliodbs.com) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7271109; Fri, 22 Apr 2005 15:30:15 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "Anjan Dave" Subject: Re: Updating table, precautions? Date: Fri, 22 Apr 2005 15:33:26 -0700 User-Agent: KMail/1.7.1 Cc: pgsql-performance@postgresql.org References: <4BAFBB6B9CC46F41B2AD7D9F4BBAF785098984@vt-pe2550-001.vantage.vantage.com> In-Reply-To: <4BAFBB6B9CC46F41B2AD7D9F4BBAF785098984@vt-pe2550-001.vantage.vantage.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504221533.26763.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.048 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/627 X-Sequence-Number: 12024 Anjan, > This is what I used to find the table size, which probably doesn't > include the index size. Is there a way to find out size of indexes? > > select relpages * 8192 as size_in_bytes from pg_class where relnamespace > = (select oid from pg_namespace where nspname = 'public') and relname = > 'r_itemcategory'; See the code in CVS in the "newsysviews" project in pgFoundry. Andrew coded up a nice pg_user_table_storage view which gives table, index and TOAST size. -- --Josh Josh Berkus Aglio Database Solutions San Francisco