4 ms·
> There's no good reason for one to be faster than the other, though! Not exactly. A varchar will store it as is, but a char column will allocate a fixed 3 (or
by ars 14y ago
> There's no good reason for one to be faster than the other, though!
Not exactly. A varchar will store it as is, but a char column will allocate a fixed 3 (or 4) bytes for each character.
All data stored in memory (for sorting and such) is always as char, even if it started as varchar.
So by allowing 4 bytes per character they use more memory.