Re: Updating table, precautions?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Anjan Dave" <adave(at)vantage(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Updating table, precautions?
Date: 2005-04-22 22:33:26
Message-ID: 200504221533.26763.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2005-04-23 01:54:04 Re: Sort and index
Previous Message Anjan Dave 2005-04-22 21:50:29 Updating table, precautions?