Data types and space needs

2007-01-05 Thread Olaf Stein
Hi All, I have somewhat of a silly question. If I define a column as int it needs 4 bytes. Do I gain anything space wise if I restrict the length to e.g. 10, int(10), or is this only a logical restriction? Thanks Olaf -- MySQL General Mailing List For list archives:

Re: Data types and space needs

2007-01-05 Thread Dan Buettner
Olaf, not a silly question at all. You can indeed save space by using different forms of integer. See http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html and http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html From that second page: Storage Requirements for

Re: Data types and space needs

2007-01-05 Thread Aaron Cannon
: [EMAIL PROTECTED] (don't send email to the hotmail address.) - - Original Message - From: Dan Buettner [EMAIL PROTECTED] To: Olaf Stein [EMAIL PROTECTED] Cc: MySql mysql@lists.mysql.com Sent: Friday, January 05, 2007 8:45 AM Subject: Re: Data types and space needs Olaf, not a silly

Re: Data types and space needs

2007-01-05 Thread Gabriel PREDA
Hi Olaf, For soon to be a decade I'm fighting with this question... !!! It's not a silly one... it's quite a tricky one... As many have noticed all INTEGER types (SMALLINT, MEDIUMINT, INT, BIGINT) have a LENGTH... by all means I can assure you that it has nothing to do with the maximum number

Re: Data types and space needs

2007-01-05 Thread Shawn Green
Gabriel PREDA wrote: snip So AFAIK this is the purpose of the length...in INTEGER columns. -- -- -- -- -- -- -- -- -- -- -- -- -- Gabriel PREDA Senior Web Developer Olaf, As Gabriel so eloquently demonstrated, the LENGTH parameter only affects how the numbers are displayed, not how they are