Space used in clustered index for variable-length data types?


msdn resources little unclear on this: if variable-length data type column (e.g. varchar(255)) used in clustered index, how space should used calculate size of index - average length of data in column or max length?

varchar columns allocate amount of space needed store the current data (plus 2 bytes overhead). therefore, best estimation use average length of data in column (plus 2 bytes overhead).
thanks
mirek

 



SQL Server  >  SQL Server Database Engine



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........