Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Data Warehousing / February 2005

Tip: Looking for answers? Try searching our database.

Null size

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Uhway - 06 Feb 2005 19:24 GMT
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
Tomasz Borawski - 11 Feb 2005 13:39 GMT
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.

> I am creating a table with following  fields:
> CREATE TABLE     Employee (
[quoted text clipped - 15 lines]
> Thanks
> BVR
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.