pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedEstimating a table size
4+ messages / 4 participants
[nested] [flat]
* Estimating a table size
@ 2006-09-21 17:07 Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
2006-09-21 17:41 ` Re: Estimating a table size Guido Barosio <gbarosio@gmail.com>
2006-09-21 17:49 ` Re: Estimating a table size Talha Khan <talha.amjad@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Rodrigo Sakai @ 2006-09-21 17:07 UTC (permalink / raw)
To: 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!
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Estimating a table size
2006-09-21 17:07 Estimating a table size Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
@ 2006-09-21 17:41 ` Guido Barosio <gbarosio@gmail.com>
2006-09-21 17:50 ` Re: Estimating a table size Shoaib Mir <shoaibmir@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Guido Barosio @ 2006-09-21 17:41 UTC (permalink / raw)
To: rodrigo.sakai@zanthus.com.br; +Cc: pgsql-admin
there used to be a dbsize project, search for it.
g.-
On 9/21/06, Rodrigo Sakai <rodrigo.sakai@zanthus.com.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!
>
>
--
Guido Barosio
-----------------------
http://www.globant.com
guido.barosio@globant.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Estimating a table size
2006-09-21 17:07 Estimating a table size Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
2006-09-21 17:41 ` Re: Estimating a table size Guido Barosio <gbarosio@gmail.com>
@ 2006-09-21 17:50 ` Shoaib Mir <shoaibmir@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Shoaib Mir @ 2006-09-21 17:50 UTC (permalink / raw)
To: Guido Barosio <gbarosio@gmail.com>; +Cc: rodrigo.sakai@zanthus.com.br; pgsql-admin
http://www.postgresql.org/docs/8.1/static/diskusage.html can help you get
this information.
Thanks,
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 9/21/06, Guido Barosio <gbarosio@gmail.com> wrote:
>
> there used to be a dbsize project, search for it.
>
> g.-
> On 9/21/06, Rodrigo Sakai <rodrigo.sakai@zanthus.com.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!
> >
> >
>
>
> --
> Guido Barosio
> -----------------------
> http://www.globant.com
> guido.barosio@globant.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Estimating a table size
2006-09-21 17:07 Estimating a table size Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
@ 2006-09-21 17:49 ` Talha Khan <talha.amjad@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Talha Khan @ 2006-09-21 17:49 UTC (permalink / raw)
To: rodrigo.sakai@zanthus.com.br; +Cc: 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.sakai@zanthus.com.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!
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-09-21 17:50 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-09-21 17:07 Estimating a table size Rodrigo Sakai <rodrigo.sakai@zanthus.com.br>
2006-09-21 17:41 ` Guido Barosio <gbarosio@gmail.com>
2006-09-21 17:50 ` Shoaib Mir <shoaibmir@gmail.com>
2006-09-21 17:49 ` Talha Khan <talha.amjad@gmail.com>
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