Skip site navigation (1) Skip section navigation (2)

Estimating a table size

From: "Rodrigo Sakai" <rodrigo(dot)sakai(at)zanthus(dot)com(dot)br>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Estimating a table size
Date: 2006-09-21 17:07:40
Message-ID: 001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS (view raw or flat)
Thread:
Lists: pgsql-admin
  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!

    

Responses

pgsql-admin by date

Next:From: themanDate: 2006-09-21 17:34:44
Subject: Re: psql: FATAL: the database system is starting up
Previous:From: Tom LaneDate: 2006-09-21 15:58:15
Subject: Re: psql: FATAL: the database system is starting up

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group