user481572
user481572

Reputation:

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.

Upvotes: 4

Views: 5358

Answers (1)

Bill Karwin
Bill Karwin

Reputation: 562671

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.

Upvotes: 11

Related Questions