Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

What’s the difference between VARCHAR(255) and TINYTEXT string types in MySQL?
Each of them allows to store strings with a maximum length of 255 characters. Storage requirements are also the same. When should I prefer one over another?
解决方案
You cannot assign a DEFAULT value to a TINYTEXT and you cannot create an unprefixed index on the latter.
Internally, additional objects are allocated in memory to handle TEXT (incl. TINYTEXT) columns which can cause memory fragmentation on the large recordsets.
Note that this only concerns the column’s internal representation in the recordsets, not how they are stored on the disk.
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/170352.html原文链接:https://javaforall.net