4 ms·
MySQL lifts restriction on VARCHAR'length from 255 to 64K. So you can change TEXT columns to VARCHAR(30000). It might not be a good idea to do it though as when
by yread 16y ago
MySQL lifts restriction on VARCHAR'length from 255 to 64K. So you can change TEXT columns to VARCHAR(30000). It might not be a good idea to do it though as when MySQL sorts things it uses a temp table with no variable length columns allowed - so these VARCHARs turn to CHARs which can explode the row size and thus the size of the whole temporary table above the maximum size of an in-memory temporary table. This commits it to disk and as it is huge it takes a long time.
Conclusion: long varchars are there but they suck. Limit their length and test test test before deploying changes to the live.
- deleted 16y ago[deleted]