Is there any performance difference between varchar(1)
and char(1)
? Which RDBMS handle these two datatypes and sizes in different ways?
In MS SQL VARCHAR(1)
uses three bytes of storage and CHAR(1)
uses one byte of storage.
CHAR(1)
is more efficient than VARCHAR(1)
in processing and storage.
The breakeven point on VARCHAR
would be anything greater than 3 characters if using variable length data.
If using fixed length then CHAR
is always more efficient by two bytes.