varchar vs text - MySQL

前端 未结 4 1070
后悔当初
后悔当初 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条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-14 12:13

    it depends on the application behavior. space allocated inside block's table decrease space for other columns and decrease density data inside it. if full table scan is used by mysql, many blocks are scanned, it's inefficient. so it depends on your sql requests.

提交回复
热议问题