sql server - Allocation of space for nvarchar and varchar -
i remember time ago being told in academia oracle when given varchar of (9) allocate space store 16 bytes worth of characters though needed 9. (pre-wide characters)
is still thing(was ever thing)? if allocate nvarchar(63) maximize storage space(assuming null character)? still take same space nvarchar(50)? there benefits indexing?
i concerned mssql, interested know of databases.
sql server allocates 2 bytes actual character in nvarchar string. nvarchar string declared nvarchar(10) ='ben' sql server allow names of 10 characters , use 6 bytes save string 'ben.' use space save actual length of string (i believe 2 bytes).
Comments
Post a Comment