Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1090585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:23:50+00:00 2026-05-16T23:23:50+00:00

Comining from my question 8078 bytes in 8060 B datapage (SQL Server)? where it

  • 0

Comining from my question “8078 bytes in 8060 B datapage (SQL Server)?” where it was explained to me how to derive 8078 bytes of data per page in MS SQL Server.

If I calculate the number of bytes per page used for data storage (without overhead) of only one row with one column of non-indexed fixed-size type record (as per the MSDN article Estimating the Size of a Heap), then I come to 8087 bytes (per page).

How do I get to to the limits of 8060 bytes per row (mentioned in my other question’s answers) and to 8000 bytes per (varchar, nvarchar) without buying and studying 1000+ page books?

I am certainly missing something in storage allocation: the fewer chunks to manage, the more overhead…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T23:23:51+00:00Added an answer on May 16, 2026 at 11:23 pm

    Inside the Storage Engine: Anatomy of a record

    This is for SQL Server 2005

    • record header
      • 4 bytes long
      • two bytes of record metadata (record type)
      • two bytes pointing forward in the record to the NULL bitmap
    • fixed length portion of the record, containing the columns storing data types that have fixed lengths (e.g. bigint, char(10), datetime)
    • NULL bitmap
      • two bytes for count of columns in the record
      • variable number of bytes to store one bit per column in the record, regardless of whether the column is nullable or not (this is different and simpler than SQL Server 2000 which had one bit per nullable column only)
      • this allows an optimization when reading columns that are NULL
    • variable-length column offset array
      • two bytes for the count of variable-length columns
      • two bytes per variable length column, giving the offset to the end of the column value
        versioning tag
    • this is in SQL Server 2005 only and is a 14-byte structure that contains a timestamp plus a pointer into the version store in tempdb

    So, for one char(8000)

    • 4 bytes (record header)
    • 8000 fixed length
    • 3 null bitmap
    • 2 bytes to count variable-length
    • 14 timestamp

    However, if you had 40 varchar(200) columns

    • 4 bytes (record header)
    • 0 fixed length
    • 6 null bitmap
    • 2 bytes to count variable-length
    • 202 x 40 = 8080
    • 14 timestamp

    Total = 8080 + 4 + 6 + 2 + 14 = 8106. WTF? You get a warning when you created this table

    I would not get too hung up on it: this information has no practical day to day value

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following on from a previous question , I am having trouble combining the Lazy<T>
I tried using the answer involving git-filterbranch from this question Combining multiple git repositories
In a recent question I was encouraged to try using some basic data structures
I'm trying to send data from an AJAX call to database tables that are
I'm just combining css files from other templates but I can figure out why
I am writing a class that inherits from IHttpHandler for script and css combining.
I am writing a class that inherits from IHttpHandler for script and css combining.
A theoretical question: We all know about the pro's of minifying and combining javascript
I have just got an answer to my question about combining the result of
I know this is a big question and it's not a yes or no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.