From: Guillaume Cottenceau <gc@mnc.ch>
To: Venkat Balaji <venkat.balaji@verse.in>
Cc: PGSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: : Performance Improvement Strategy
Date: Wed, 05 Oct 2011 11:39:58 +0200
Message-ID: <m3zkhfhj4h.fsf@mnc.ch> (raw)
In-Reply-To: <CAFrxt0jLu9rtVTSkojRJn4ezehfmAyyShoVZdPKSUKKrcLT6nw@mail.gmail.com>
References: <CAFrxt0j5UysgEU8hQxZ_mGbdex8Ev-bGdGsdpOGYYSO-jO24Fw@mail.gmail.com>
<4E79E091.2030401@peak6.com>
<CAFrxt0jLu9rtVTSkojRJn4ezehfmAyyShoVZdPKSUKKrcLT6nw@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: gc@mnc.ch, venkat.balaji@verse.in
Subject: Re: : Performance Improvement Strategy
In-Reply-To: <m3zkhfhj4h.fsf@mnc.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox