From rodrigo.sakai@zanthus.com.br Thu Sep 21 17:24:03 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EB35B9FB1E8 for ; Thu, 21 Sep 2006 14:24:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 28054-05 for ; Thu, 21 Sep 2006 14:23:54 -0300 (ADT) X-Greylist: delayed 00:17:43.499913 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B02089FB1F0 for ; Thu, 21 Sep 2006 14:23:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.zanthus.com.br (mail.zanthus.com.br [200.212.65.85]) by svr4.postgresql.org (Postfix) with ESMTP id AA3A85AFA2A for ; Thu, 21 Sep 2006 17:06:02 +0000 (GMT) Received: from cprsakai (unknown [192.168.0.71]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.zanthus.com.br (Postfix) with ESMTP id DBE9A248E1 for ; Thu, 21 Sep 2006 14:13:59 -0300 (BRT) Reply-To: From: "Rodrigo Sakai" To: Subject: Estimating a table size Date: Thu, 21 Sep 2006 14:07:40 -0300 Organization: Zanthus Message-ID: <001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001C_01C6DD87.4CEE58D0" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Thread-Index: AcbdoHGzSbpYcoQ8THaM/GkHW6bnVw== X-Zanthus-MailScanner: Found to be clean X-Zanthus-MailScanner-From: rodrigo.sakai@zanthus.com.br X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200609/229 X-Sequence-Number: 23143 This is a multi-part message in MIME format. ------=_NextPart_000_001C_01C6DD87.4CEE58D0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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! ------=_NextPart_000_001C_01C6DD87.4CEE58D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

  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 >=3D 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!

    =

------=_NextPart_000_001C_01C6DD87.4CEE58D0-- From gbarosio@gmail.com Thu Sep 21 17:42:06 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1814C9FB321 for ; Thu, 21 Sep 2006 14:42:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 29056-05 for ; Thu, 21 Sep 2006 14:41:58 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.237]) by postgresql.org (Postfix) with ESMTP id 3C2229FB319 for ; Thu, 21 Sep 2006 14:41:58 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id t13so756164wxc for ; Thu, 21 Sep 2006 10:41:57 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P7nmcXU1gGBTL3YfL089FCwPP2ziJBR+M9Zh/EN5KYHHKTnhufayJme+Vzef6mlCXOg6xk14kNBMOUrg+Eolp0Q1OuuILNW0O+bq5bx8h8qF5YyUyGJLj5Tp+r2/tP6CQcTBnDVdsRuo9gAufKS22Rj9h0rIaZeVP21y6VU35Gc= Received: by 10.90.113.18 with SMTP id l18mr7597050agc; Thu, 21 Sep 2006 10:41:56 -0700 (PDT) Received: by 10.90.71.14 with HTTP; Thu, 21 Sep 2006 10:41:56 -0700 (PDT) Message-ID: Date: Thu, 21 Sep 2006 14:41:56 -0300 From: "Guido Barosio" To: rodrigo.sakai@zanthus.com.br Subject: Re: Estimating a table size Cc: pgsql-admin@postgresql.org In-Reply-To: <001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/231 X-Sequence-Number: 23145 there used to be a dbsize project, search for it. g.- On 9/21/06, Rodrigo Sakai 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 From talha.amjad@gmail.com Thu Sep 21 17:50:13 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1B95B9FB369 for ; Thu, 21 Sep 2006 14:50:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 30843-05 for ; Thu, 21 Sep 2006 14:50:00 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.236]) by postgresql.org (Postfix) with ESMTP id A26F29FB365 for ; Thu, 21 Sep 2006 14:50:00 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id t13so758354wxc for ; Thu, 21 Sep 2006 10:49:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=WD+KajUikj7ClU+6IN9zmIguggHu9sTFy2fKvLPzIX/+qQo6HBw8nuJMfjLHBGrZAJj7qqs6dQVM8BQMWD1ZzBn9dO4dTFpLzZCRGGPzUQp4lJ4P/G5zOSbOGSNUVK83MSNOr6K4lfR07Ie1LARXiS2Cn5My/agxLPid3aOQtoU= Received: by 10.70.19.16 with SMTP id 16mr25667613wxs; Thu, 21 Sep 2006 10:49:59 -0700 (PDT) Received: by 10.70.71.8 with HTTP; Thu, 21 Sep 2006 10:49:58 -0700 (PDT) Message-ID: Date: Thu, 21 Sep 2006 10:49:58 -0700 From: "Talha Khan" To: rodrigo.sakai@zanthus.com.br Subject: Re: Estimating a table size Cc: pgsql-admin@postgresql.org In-Reply-To: <001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_15774_6132824.1158860998972" References: <001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.966 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/232 X-Sequence-Number: 23146 ------=_Part_15774_6132824.1158860998972 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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! > > > ------=_Part_15774_6132824.1158860998972 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
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!

   


------=_Part_15774_6132824.1158860998972-- From shoaibmir@gmail.com Thu Sep 21 17:50:25 2006 X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 331439FB369 for ; Thu, 21 Sep 2006 14:50:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 32041-03 for ; Thu, 21 Sep 2006 14:50:15 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.227]) by postgresql.org (Postfix) with ESMTP id 165AC9FB365 for ; Thu, 21 Sep 2006 14:50:14 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 55so433040wri for ; Thu, 21 Sep 2006 10:50:14 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=knKjDv+hVMJvhXUsne5rpd2cdNVQQB12Y6TpZsTbNdgc0K4Pak4lPAhlfzzvxtDCCepSse3bLVD7/Y4ImN9xdG8XAmThImJIh1FofRkg2wqHomJ9U/X4Vryp9CXw6k+6PtSc4wKkWi/fmTOT2JTBChEN+E2DZcRIirPiqIJzPGQ= Received: by 10.90.79.6 with SMTP id c6mr7609894agb; Thu, 21 Sep 2006 10:50:14 -0700 (PDT) Received: by 10.90.81.4 with HTTP; Thu, 21 Sep 2006 10:50:14 -0700 (PDT) Message-ID: Date: Thu, 21 Sep 2006 22:50:14 +0500 From: "Shoaib Mir" To: "Guido Barosio" Subject: Re: Estimating a table size Cc: rodrigo.sakai@zanthus.com.br, pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13078_15218472.1158861014143" References: <001b01c6dda0$723b90d0$4700a8c0@TREEZANTHUS> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.605 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, HTML_40_50, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/233 X-Sequence-Number: 23147 ------=_Part_13078_15218472.1158861014143 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 wrote: > > there used to be a dbsize project, search for it. > > g.- > On 9/21/06, Rodrigo Sakai 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 > ------=_Part_13078_15218472.1158861014143 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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




------=_Part_13078_15218472.1158861014143--