Hi,
Each row in SQL Server has a fixed structure:
- row header
- null columns bit flags (typically 4 byte)
- fixed length columns (like int, char)
- variable length columns (like varchar)
If one of a bit is selected then a corresponding column has null value.
Typically, if you calculate required space, you do not have to worry about
null columns values. Instead of that, you should increase a total value by 10
percent.
Tomasz B.
[quoted text, click to view] "Uhway" wrote:
> I am creating a table with following fields:
> CREATE TABLE Employee (
> EmployeeID bigint NOT NULL,
> EmpName Varchar(50),
> EmpAge int,
> ImageSize int,
> EmpImage image,
> Comments varchar (50) )
>
> 20% of the time all fields are populated. But rest of the time no image or
> age is stored in the fields. So, when there is a null value in those
> fields, what will be the size of the null value fields for calculating a row
> size? On average the I can say the image size will be around 25K. I need
> this information to calculate a space required for 25 million row table.
>
> That's why I am particular about null(pointer?) value size.
>
> Thanks
> BVR
>
>