Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top