简体   繁体   中英

MySQL InnoDB VARCHAR performance versus TEXT on inserts

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM