List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:March 19 1999 12:48am
Subject:Text, TinyText vs Char, VarChar
View as plain text  
Barry writes:
 > Hello Everyone!,
 > 
 > I just subscribed to this list. I am in to my first MySQL project - A
 > charity auction on the Web.
 > 
 > I am defining four tables for a MySQL Web Database to run on NT. The tables
 > contain mostly text type columns with an autoinc rec number and char itemid.
 > 
 > Question: Is there any disadvantage to using MySQL datatypes "Text" or
 > "TinyText" for textual type columns.
 > 
 > For columns such as "Address", I now have VarChar(64) to allow enough space
 > for the longest resonable entry. But if I used "TinyText", I would not have
 > to worry about the 65 char address (which will probably be the first one :) ).
 > 
 > Other than "TinyText" can't be an index field - which it won't. Do I pay a
 > penalty? Do I gain anything? - other than flexibility.
 > 
 > Thanks much for your insight.
 > 
 > Barry.

Hi!

There are disadvantages when using varchar, text or blob fields, as
these will make your tables of the variable length type. These ones
are slower then fixes size tables.

On the other hand, if sizes of actual data differ widely, you have no
choice.

Text fields (not Tiny) can be greater then varchar.



Sinisa

+---------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___        ==  mysql@stripped        |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|        Sinisa Milivojevic      |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|        mailto:sinisa@stripped |
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|        Belgrade                |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|_____   Serbia                  |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                           |
|             /*/             \*\                   Developers Team   |
+---------------------------------------------------------------------+
Thread
Text, TinyText vs Char, VarCharBarry18 Mar
  • Text, TinyText vs Char, VarCharsinisa19 Mar