Re: Estimating a table size

From: "Talha Khan" <talha(dot)amjad(at)gmail(dot)com>
To: rodrigo(dot)sakai(at)zanthus(dot)com(dot)br
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Estimating a table size
Date: 2006-09-21 17:49:58
Message-ID: f80885fc0609211049w3ea123ebk5e19e96851917a22@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

when you have dbsize installed you need to do

select relation_size('TableName');

to get the size of the table.

On 9/21/06, Rodrigo Sakai <rodrigo(dot)sakai(at)zanthus(dot)com(dot)br> wrote:
>
> Hello all,
>
>
>
> I need a tool or something like it, which can give me the estimated size
> of a table considering all fields, constraints, indexes, etc...
>
>
>
> For example:
>
>
>
>
>
> CREATE TABLE products (
>
> product_id INT8,
>
> product_name VARCHAR(50),
>
> product_vendor VARCHAR(50),
>
> price NUMERIC(10,2),
>
>
>
> CONSTRAINT pk_products PRIMARY KEY (product_id),
>
> CONSTRAINT ck_price CHECK (price >= 0)
>
> );
>
>
>
>
>
> CREATE INDEX ix_products ON products (product_name);
>
>
>
>
>
> See that in the example above I have, some fields, some constraints and
> one index. I want to know (estimate) how much fisical space (KB, MB) it will
> consume!
>
>
>
>
>
> Thanks in advance!
>
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Shoaib Mir 2006-09-21 17:50:14 Re: Estimating a table size
Previous Message Guido Barosio 2006-09-21 17:41:56 Re: Estimating a table size