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.
Solid releases high-performance storage engine for MySQL
12/19/06
Possible to edit table data with MySQL Administrator?
11/09/06
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
| Use this form to start a public discussion with other Linux World users on this article. Log In | Register for an account (Why you should) |
Note: Register to have your user name appear; otherwise your comment will show up as "Anonymous."
*Anonymous comments will only appear once they are approved by the moderator.
• Dell puts Linux and Atom in Vostro PCs
• Mozilla names best Firefox 3 add-ons
• Torvalds: Fed up with the 'security circus'
• Dell Latitude ON - big win for Linux
• Open source advocates hail appeals court ruling
LinuxWorld Conference and Expo San Francisco, August 4-7, 2008.
Linux Plumbers Conference Portland, OR, Sept. 16-19, 2008.
FreedomHEC Santa Monica, November 8-9, 2008.