Archive for the MySQL Category

Difference of between CHAR and VARCHAR

Posted in MySQL on March 25, 2009 by myleskadusale

CHAR is a fixed-length character data type while VARCHAR is a variable-length character data type.

Because CHAR is a fixed-length data type, the storage size of the CHAR value is equal to the maximum size for this column. Because VARCHAR is a variable-length data type, the storage size of the VARCHAR value is the actual length of the data entered, not the maximum size for this column.

You can use CHAR when the data entries in a column are expected to be the same size.
You can use VARCHAR when the data entries in a column are expected
to vary considerably in size.

Advertisements

Dealing Large Tables in MySQL

Posted in MySQL with tags , , , , , on February 25, 2009 by myleskadusale

Today I found a site that gives good tips in dealing large tables in MySQL.

Why MySQL could be slow with large tables