Regarding SQL Server, I understand :
var
means the memory is lazy allocated, meaning it fits to the data exactly (on insertion).
MAX
means there is no size restrictionlimitation.
Then, is it always preferable to use MAX
when using varchar
, as we don't allocate the whole size anyhow?
Should we use a constant size only if there is a constraint we want to enforce on this DB column?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…