- The 10 dumbest mistakes network managers make
- Six Windows 7 features admins will actually care about
- Why the iPhone can't be "killed"
- Nortel enterprise chief wants to bring back Bay
- More porn sneaks onto the iPhone
The differences in processing efficiency between MySQL's three character storage types should not have a big impact on processing times unless your data sets are extremely large.
CHAR items, which are fixed length, are the fastest to store and retrieve but can waste storage space.
VARCHAR, a variable-length string, can be slower to store and retrieve but does not waste storage space.
TEXT is a character BLOB that requires more storage space and I/O than the other two.
Using all CHAR fields for text data technically is the fastest choice, but CHAR data items have a maximum length of 255 characters. The latest versions of MySQL allow VARCHAR items to be up to 65,535 characters long, which is the maximum length of a row.
TEXT is appealing because, unlike with VARCHAR, you can put multiple full-size TEXT items in one row. To enable full-text indexing for the data, you will need to use the MyISAM table type for your database regardless of which variable types you choose for your data fields.
Comments (1)
The importance of CBLOBBy Anonymous on May 5, 2007, 8:24 amCBLOB datatype in mysql Re: Differences between MySQL character data types.
Reply | Read entire comment
View all comments