Tuesday, June 17, 2014

MSSQL table row and column limit

The max number of columns allowed in MSSQL database is 1024. Wide table can contain up to 30000 columns, but it applies only to sparse columns, meaning most columns should be null and regular/calculated columns number is still 1024, and there is performance issue. This is from this article in MSDN.

Also bytes per row is limited to max 8060 (also from the link above, or here). varchar types can be longer but still will decrease performance. Since max length for any field is 8 bytes, this is 1024*8 = 8192, a little higher than 8060.


No comments:

Blog Archive

Followers