Skip to content Skip to sidebar Skip to footer

8078 Bytes In 8060 B Datapage (sql Server)?

It is written everywhere that data in SQL Server is written in pages of 8K (8192 B) each with 8060 bytes for data and the rest is overhead (system info). Though, the recent article

Solution 1:

Long answer short, the limit is 8060 bytes per row, but 8096 bytes per page. The rows in the article you linked have a row size of ~4000 bytes, so they are well under the limit per row. However, that does not answer the question of how many such rows fit on a page.

See "Estimating the size of a heap" in Books Online:

http://msdn.microsoft.com/en-us/library/ms189124.aspx

If you do the calculation for the tables in the article, you'll see that the first table has a physical row size of 4048 bytes, which is exaclty half the 8096 limit for a page.

Solution 2:

  • The maximum row size is 8060 bytes
  • In this case, there are two rows each of 4039 bytes

Post a Comment for "8078 Bytes In 8060 B Datapage (sql Server)?"