varchar vs text - MySQL

前端 未结 4 1062
后悔当初
后悔当初 2021-01-14 12:04

in my project an user can write comment [plain text], and view others comment, can delete own comment, but can not update comment !
In this case which would should i use

4条回答
  •  Happy的楠姐
    2021-01-14 12:14

    Varchar is usually faster in retrieval when the size is reasonable, as it is stored within the table, where as TEXT is stored off the table with a pointer to location.

    Thanks

提交回复
热议问题