Hello.


Really, a varchar(255) column gives you a big flexibility and

may save a lot of space. Usually such records uses as many characters

as needed plus one byte for it's length. When you use MyISAM tables you

can get some performance disadvantages and use more space when your table

is fragmented (you can solve this using OPTIMIZE TABLE). But for InnoDB 

tables it is recommended to use varchar columns, however this storage engine is

not so fast as MyISAM.  If you need a column  for which trailing spaces are

not removed, consider using a BLOB or TEXT type.  





Yves Goergen <[EMAIL PROTECTED]> wrote:

> Hi list,

> 

> I've just been wondering if the length parameter of a VARCHAR column has

> any effect on storage efficiency or space requirements. Afaik, VARCHAR

> columns only store the amount of data actually written into them and

> require no significantly more memory. So to be especially flexible with

> a particular table column, could I just define it VARCHAR(255) and face

> no further disadvantage of it?

> 

> Thanks for the info...

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to