sql server - How do you get to limits of 8060 bytes per row and 8000 per (varchar, nvarchar) value? -


When I was less than my question, where I was told how to remove 8078 bytes of data per page in MS SQL server.

If I calculate the number of bytes, then for a single row with a column of non-indexed fixed-size type records (according to MSDN text) for data accumulation (without overhead) I used to come to 8087 bytes (per page).

I have been studying 1000+ page books without buying 8060 bytes per line (mentioned in the answer to my second question) and buying 8000 bytes per (varchar, nvarchar)?

I am definitely missing something in storage allocation: fewer parts to manage, more overhead ...

This SQL Server 2005

  • The record header
    • Two bytes of record metadata (record type)
    • Point to two bytes pointing to tap bitmap in the record
  • Record Part of the fixed length, in which the data The data contains processed columns (such as bilint, character (10), day-time)
  • Faucet bitmap
    • Two bytes for the count of columns in the record
    • The variable number of bytes to store a column per column in the record, whether the column is flexible or not (this is separate and simple)
    • The variable-length column offset array (SQL Server 2000 , In which an outstanding copy is zero column)
      • Two bytes for counting variable-length columns
      • Each variable length column per barrel, from which the column value is given to the offset of the closing of the version tag
    • This is only in SQL Server 2005 and a 14- Byte Structure in which Timestamp Plus version is an indicator in

    in the store, so for one character (8000)

    • 4 bytes (record header)
    • 8000 fixed length
    • 3 tap bitmap
    • 2 bytes to calculate
    • 14 timestamps

    However, if you want to

  • Fixed length of
  • 6 tap bitmap
  • Variable length 2 bytes
  • 202 x 40 = 8080
  • 14 timestamps

total = 8080 + 4 + 6 + 2 + 14 = 8106. WTF?

I will not even be hung on this: No Day of the practical day

in this information gives you a warning.

Comments