Quick Answer
CHAR(n): fixed-length, padded with spaces. Fast for fixed-size values (codes, flags). VARCHAR(n): variable-length with 1-2 byte length prefix. Best for most text columns. TEXT/MEDIUMTEXT/LONGTEXT: stored outside the row when large, slower to access. For short text (<255 chars): VARCHAR. For long documents: TEXT. CHAR is slightly faster for fixed-size data due to no length calculation. VARCHAR is almost always the right choice.
Answer
CHAR is fixed-length and fast. VARCHAR is variable-length and space-efficient. TEXT is stored separately and slower to query.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.