Re: Updating table, precautions? - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Updating table, precautions?
Date
Msg-id 200504221533.26763.josh@agliodbs.com
Whole thread Raw
In response to Updating table, precautions?  ("Anjan Dave" <adave@vantage.com>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Anjan Dave"
Date:
Subject: Updating table, precautions?
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Sort and index