performance between varchar(1) vs char(1)

robinmag picture robinmag · Jul 30, 2010 · Viewed 16.1k times · Source

Is there any performance difference between varchar(1) and char(1)? Which RDBMS handle these two datatypes and sizes in different ways?

Answer

Awk Sod picture Awk Sod · Dec 3, 2014

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.

REF: http://msdn.microsoft.com/en-gb/library/ms176089.aspx