After following formula in documentation I arrive at:
Num_Rows = 100,000
Num_Cols = 23
Fixed_Data_Size = 98 bytes
Num_Variable_Cols = 16 fields
Max_Var_Size = 8000 bytes ** Field3 is varchar with length 8000, so is this
8000 bytes?***
Null_Bitmap = 5
Variable_Data_Size = 8034
Row_Size = 8141
Rows_Per_Page = (INT(8096/(Row_Size + 2)) ** is zero correct?**
Free_Rows_Per_Page = 100 (I have no clustered index)
Num_Pages = -1000 ** is this correct, a negative Num_Pages?**
Total Size (Mb) = -7.81
MyTable has 23 fields with 100,000 records.
Field1 nvarchar 90 * variable*
Field2 char 6 *fixed*
Field3 varchar 8000 *variable*
Field4 nvarchar 200 *variable*
Field5 nvarchar 200 *variable*
Field6 nvarchar 200 *variable*
Field7 nvarchar 200 *variable*
Field8 nvarchar 200 *variable*
Field9 char 30 *fixed*
Field10 char 30 *fixed*
Field11 nvarchar 200 *variable*
Field12 nvarchar 200 *variable*
Field13 float 8 *fixed*
Field14 datetime 8 *fixed*
Field15 datetime 8 *fixed*
Field16 datetime 8 *fixed*
Field17 nvarchar 200 *variable*
Field18 nvarchar 200 *variable*
Field19 varchar 8000 *variable*
Field20 nvarchar 200 *variable*
Field21 nvarchar 200 *variable*
Field22 nvarchar 200 *variable*
Field23 varchar 8000 *variable*
I'm going to assume all variable fields are close to maximum capacity.
Thanks for previous reply Simon!
"Simon Hayes" <sql@hayes.ch> wrote in message
news:3f2ec4e7$1_1@news.bluewin.ch...[color=blue]
>
> "TZone" <TZone@optus.com.au> wrote in message
> news:3f2e4086$0$14563$afc38c87@news.optusnet.com.a u...[color=green]
> > I was hoping I can get some help regarding subject mater located at
> >[/color]
>[/color]
http://msdn.microsoft.com/library/de...es_02_92k3.asp[color=blue][color=green]
> >[/color]
>
> <snip>
>
> You're correct that float and datetime are fixed length, and both are[/color]
indeed[color=blue]
> 8 bytes (for your float precision, as you noted), which seems to be your
> main question. You just need to follow the formulas in the documentation.
>
> One point you may need to consider is how full the average variable length
> column will be - if you know that almost all data in an nvarchar(100)[/color]
column[color=blue]
> will be around 50 Unicode characters, ie. half the length of the field,[/color]
then[color=blue]
> you could count that as 100 bytes instead of 200 to get a more accurate
> estimate. Or if the average will be around 75, then count 150 etc. But
> you're the only person who knows what your data looks like, so you're the
> best person to calculate the size of the table.
>
> Simon
>
>[/color]