From ganesh@epedas.com.my Mon Dec 8 12:53:13 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3673BD1B445; Mon, 8 Dec 2003 12:53:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 10910-07; Mon, 8 Dec 2003 08:52:45 -0400 (AST) Received: from magnusquest.com (magnusquest.com [128.121.126.6]) by svr1.postgresql.org (Postfix) with ESMTP id 94E02D1B4A9; Mon, 8 Dec 2003 08:52:33 -0400 (AST) Received: from ganesan ([219.93.76.2]) by magnusquest.com (8.12.10/8.11.6) with ESMTP id hB8CqSSD051943; Mon, 8 Dec 2003 20:52:30 +0800 (MYT) From: "Ganesan Kanavathy" To: , Subject: Field Size Date: Mon, 8 Dec 2003 20:52:03 +0800 Message-ID: <006301c3bd8a$18976f60$5400a8c0@headquarters.mq.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0064_01C3BDCD.26BAAF60" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_80_90 X-Spam-Level: X-Archive-Number: 200312/120 X-Sequence-Number: 11628 This is a multi-part message in MIME format. ------=_NextPart_000_0064_01C3BDCD.26BAAF60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can anyone tell me, what harm would setting a field size to 1000 characters do to the size? By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only? Regards, Ganesan ------=_NextPart_000_0064_01C3BDCD.26BAAF60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Can anyone tell me, what harm would setting a field size= to 1000 characters do to the size?

 

By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only?

 

Regards,

Ganesan

 

------=_NextPart_000_0064_01C3BDCD.26BAAF60-- From ganesh@magnusquest.com Mon Dec 8 12:57:02 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 94031D1B454; Mon, 8 Dec 2003 12:57:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 15075-02; Mon, 8 Dec 2003 08:56:33 -0400 (AST) Received: from magnusquest.com (magnusquest.com [128.121.126.6]) by svr1.postgresql.org (Postfix) with ESMTP id 24939D1B474; Mon, 8 Dec 2003 08:56:30 -0400 (AST) Received: from ganesan ([219.93.76.2]) by magnusquest.com (8.12.10/8.11.6) with ESMTP id hB8CuVEb052425; Mon, 8 Dec 2003 20:56:32 +0800 (MYT) From: "Ganesan Kanavathy" To: , Subject: Re: Field Size Date: Mon, 8 Dec 2003 20:56:06 +0800 Message-ID: <007201c3bd8a$a930ccb0$5400a8c0@headquarters.mq.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0073_01C3BDCD.B7540CB0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: Importance: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_80_90, HTML_FONT_COLOR_BLUE X-Spam-Level: X-Archive-Number: 200312/82 X-Sequence-Number: 11590 This is a multi-part message in MIME format. ------=_NextPart_000_0073_01C3BDCD.B7540CB0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can anyone tell me, what harm would setting a field size to 1000 characters do to the size? By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only? Regards, Ganesan ------=_NextPart_000_0073_01C3BDCD.B7540CB0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Can= anyone tell me, what harm would setting a field size to 1000 characters do to the size?

 

By increasing the size, will t= he database require more space? Or does it only consume space if there is data= in the field only?

 

Regards,=

Ganesan<= /o:p>

 

------=_NextPart_000_0073_01C3BDCD.B7540CB0-- From marc@redboxdata.com Mon Dec 8 13:04:19 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 19237D1B436; Mon, 8 Dec 2003 13:04:19 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 15075-06; Mon, 8 Dec 2003 09:03:51 -0400 (AST) Received: from appsrv1.nuvergence.com (appsrv1.mgamble.ca [64.56.239.120]) by svr1.postgresql.org (Postfix) with ESMTP id CD416D1B454; Mon, 8 Dec 2003 09:03:47 -0400 (AST) Received: from DELL-P4 (CPE000c418f70c3-CM400049675314.cpe.net.cable.rogers.com [24.112.136.107]) by appsrv1.nuvergence.com (Postfix) with ESMTP id 28EC730AE1C; Mon, 8 Dec 2003 08:03:28 -0500 (EST) From: "Marc A. Leith" To: "Ganesan Kanavathy" , "pgsql-admin@postgresql.org" , "pgsql-sql@postgresql.org" Date: Mon, 08 Dec 2003 08:03:12 -0500 X-Mailer: PMMail 2000 Professional (2.20.2717) For Windows 2000 (5.1.2600;1) In-Reply-To: <007201c3bd8a$a930ccb0$5400a8c0@headquarters.mq.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_=_=_=IMA.BOUNDARY.HTML_3985304=_=_=_" Subject: Re: Field Size Message-Id: <20031208130328.28EC730AE1C@appsrv1.nuvergence.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=3.2 tagged_above=0.0 required=5.0 tests=HTML_10_20, HTML_FONT_COLOR_BLUE, HTML_FONT_COLOR_UNSAFE, HTML_FONT_FACE_ODD, IN_REP_TO, SUSPICIOUS_RECIPS X-Spam-Level: *** X-Archive-Number: 200312/83 X-Sequence-Number: 11591 --_=_=_=IMA.BOUNDARY.HTML_3985304=_=_=_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit If you define the field as CHAR, 1000 bytes will be consumed. If you define the field as VARCHAR, on sufficient bytes to store the contents will be used. Marc --Original Message Text--- From: Ganesan Kanavathy Date: Mon, 8 Dec 2003 20:56:06 +0800 Clean Clean DocumentEmail MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle- colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow- orphan; font-size:10.0pt; font-family:"Times New Roman";} Can anyone tell me, what harm would setting a field size to 1000 characters do to the size? By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only? Regards, Ganesan Marc A. Leith President redboxdata inc. e-mail: marc@redboxdata.com cell: (416) 737 0045 --_=_=_=IMA.BOUNDARY.HTML_3985304=_=_=_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: 7bit If you define the field as CHAR, 1000 bytes will be consumed.

If you define the field as VARCHAR, on sufficient bytes to store the contents will be used.

Marc

--Original Message Text---
From: Ganesan Kanavathy
Date: Mon, 8 Dec 2003 20:56:06 +0800

Clean Clean DocumentEmail MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";}

Can anyone tell me, what harm would setting a field size to 1000 characters do to the size?



By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only?



Regards,

Ganesan





Marc A. Leith
President
redboxdata inc.

e-mail: marc@redboxdata.com
cell:    (416) 737 0045 --_=_=_=IMA.BOUNDARY.HTML_3985304=_=_=_-- From sbangalore@zensutra.com Mon Dec 8 13:05:51 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id A3F45D1B454; Mon, 8 Dec 2003 13:05:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 16730-01; Mon, 8 Dec 2003 09:05:23 -0400 (AST) Received: from exchange.india.zensutra.com (unknown [202.62.80.230]) by svr1.postgresql.org (Postfix) with ESMTP id E2E03D1B483; Mon, 8 Dec 2003 09:05:17 -0400 (AST) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3BD8C.28B49420" Subject: Re: Field Size X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Mon, 8 Dec 2003 18:36:57 +0530 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Field Size Thread-Index: AcO9i2blMKMKTwjfR7ujszR2uGhLpAAAGsgw From: "Somasekhar Bangalore" To: "Ganesan Kanavathy" , , X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.6 tagged_above=0.0 required=5.0 tests=HTML_70_80, HTML_FONT_COLOR_BLUE, HTML_FONT_COLOR_RED, RCVD_IN_RFCI X-Spam-Level: * X-Archive-Number: 200312/84 X-Sequence-Number: 11592 This is a multi-part message in MIME format. ------_=_NextPart_001_01C3BD8C.28B49420 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable There is no harm in having a field size of 1000 character provided u use th= e proper datatype. Don't user char(1000). Try using varchar(1000). =20 For character data it is recommended to use the VARCHAR type, since Postgre= SQL manages it very well. On the contrary, if you use the CHAR datatype, t= he size you specify for the string is pre-allocated in the pages and you al= locate space which may not be used. So your database is bigger than what i= t should be and performance is lowered, because this way you need more I/O = to read the data. =20 Som =20 -----Original Message----- From: Ganesan Kanavathy [mailto:ganesh@magnusquest.com] Sent: Monday, December 08, 2003 6:26 PM To: pgsql-sql@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Field Size =20 Can anyone tell me, what harm would setting a field size to 1000 characters= do to the size? =20 By increasing the size, will the database require more space? Or does it on= ly consume space if there is data in the field only? =20 Regards, Ganesan =20 ------_=_NextPart_001_01C3BD8C.28B49420 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

There is no harm in having a field size of 1000 character provided u= use the proper datatype. Don’t user char(1000). Try using varchar(1000).<= o:p>

 

For character data it is recommend= ed to use the VARCHAR type, since PostgreSQL manages it very well.  On = the contrary, if you use the CHAR datatype, the size you specify for the string= is pre-allocated in the pages and you allocate space which may not be used.  So your database is bigger than what it should be and performance is lowered, because this way you need more I/O to read the data= .

 

Som

 <= /span>

-----Original Message-----
From: Ganesan Kanavathy [mailto:ganesh@magnusquest.com]
Sent: Monday, December 08, 2= 003 6:26 PM
To: pgsql-sql@postgresql.org; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Field S= ize

 <= /o:p>

= Can anyone tell me, what harm would setting a field size to = 1000 characters do to the size?

 

By increasing the size, will the database require more space? Or does it only consume space if there is data in the field only?

 

Regards,

Ganesan

 = ;

------_=_NextPart_001_01C3BD8C.28B49420-- From bruno@wolff.to Mon Dec 8 15:36:51 2003 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 823A0D1B42F for ; Mon, 8 Dec 2003 15:36:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 35649-10 for ; Mon, 8 Dec 2003 11:36:23 -0400 (AST) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 3A37CD1B4AC for ; Mon, 8 Dec 2003 11:36:19 -0400 (AST) Received: (qmail 6085 invoked by uid 500); 8 Dec 2003 15:35:52 -0000 Date: Mon, 8 Dec 2003 09:35:52 -0600 From: Bruno Wolff III To: Somasekhar Bangalore Cc: Ganesan Kanavathy , pgsql-sql@postgresql.org, pgsql-admin@postgresql.org Subject: Re: Field Size Message-ID: <20031208153552.GA5971@wolff.to> Mail-Followup-To: Somasekhar Bangalore , Ganesan Kanavathy , pgsql-sql@postgresql.org, pgsql-admin@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/90 X-Sequence-Number: 11598 On Mon, Dec 08, 2003 at 18:36:57 +0530, Somasekhar Bangalore wrote: > There is no harm in having a field size of 1000 character provided u use the proper datatype. Don't user char(1000). Try using varchar(1000). And if the 1000 limit is just a large number you picked rather than a real rule for your data, then you probably want to use the TEXT type.