2 ms·
This detailed analysis? As you can see times are very similar – there are differences between data types, but there is no clear “winner", and I'm
by mbreese 13y ago
This detailed analysis?
As you can see times are very similar – there are
differences between data types, but there is no clear
“winner", and I'm much more inclined to assume that
these differences come from random fluctuations of load
on my machine, than from anything else.
....
This (I believe) proves that performance of all 4
datatypes is the same.
In other words, there is no difference between them in terms of performance. There is a slight increase in disk usage possible for CHAR, but really, that's used for fixed sized fields anyway (like product codes), so that's not an issue.
The idea that you should just blindly use TEXT fields is horrible advice. You should model your data accurately to make sure you can use your database to do its job - protect and store your data. Otherwise, why not just skip the pretenses and use a NoSQL storage engine.
If you need a TEXT field to store data that could be large, then do it. But don't make your "username" field a TEXT when VARCHAR(300) would do.