Question

Using MySQL 5 InnoDB should varchar be used over text in a table where you expect many inserts? I intend to store text with a maximum length of 2000 characters.

Was it helpful?

Solution

VARCHAR and TEXT are stored identically in MySQL's InnoDB storage engine. There is no performance difference.

See Blob Storage in Innodb for lots of detailed explanation.

The only difference between these two data types is that VARCHAR can have a DEFAULT, whereas TEXT cannot.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top