I'm trying to estimate the index size using the information provided at the MSDN website.
Let us consider a table "Table1" with three columns in it. The columns are listed below,
- Id int, not null
- Marks int, not null
- SubmitDate Date, not null
Initially, I have created a clustered primary key on Id column and then planned to create a non-clustered index with "Id" as "index key column" where as, "Marks" and "SubmitDate" columns will be used as "Included Columns" in the index.
Based on the above plan, I was trying to estimate the Non-Clustered index key size before creating it. While going through the MSDN site , I have lot of confusions to be clarified. There are four steps to estimate the nonclustered index key size and at the first step, 1.2 and 1.3 explains about, how to calculate the Num_Key_Cols, Fixed_Key_Size, Num_Variable_Key_Cols and Max_Var_Key_Size. But at 1.2 and 1.3, we should calculate based on the Index key type, do we have clustered index key already or not and do we have included columns or not; it seems to be confusing. Can anybody help me based on the info that I have provided about the sample table (Table1) and the Non-Clustered Index Key structure that I would like to create.
In my case, I have included columns, index key column was already a primary key, and all the columns are not null fields. how to calculate the index size for it?
Thanks in advance.