Re: : Performance Improvement Strategy

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: Venkat Balaji <venkat(dot)balaji(at)verse(dot)in>
Cc: PGSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: : Performance Improvement Strategy
Date: 2011-10-05 09:39:58
Message-ID: m3zkhfhj4h.fsf@mnc.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Venkat Balaji <venkat.balaji 'at' verse.in> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2011-10-05 16:13:59 Re: : Performance Improvement Strategy
Previous Message Raghavendra 2011-10-05 09:30:59 Re: : Performance Improvement Strategy