October 22, 2012 at 9:15 am
Is it possible to estimate the size of an index before creating it?
October 22, 2012 at 9:22 am
Yup.
(Size of index key + size of clustered index key) * number of rows / 8196 = number of leaf level pages required. It's an under-estimate, but it'll be within a reasonable error.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 22, 2012 at 9:23 am
Try reading these:
Estimating the Size of a Nonclustered Index
http://msdn.microsoft.com/en-us/library/ms190620(v=sql.100).aspx
Estimating the Size of a Clustered Index
http://msdn.microsoft.com/en-us/library/ms178085(v=sql.100).aspx
October 22, 2012 at 9:33 am
GilaMonster (10/22/2012)
Yup.(Size of index key + size of clustered index key) * number of rows / 8196 = number of leaf level pages required. It's an under-estimate, but it'll be within a reasonable error.
Does size of index key mean the size of nonclustered index?
October 22, 2012 at 10:13 am
No, it means the size of the columns you've chosen as key columns. If it meant the size of the index (which we're trying to calculate) it would be a rather recursive definition.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 22, 2012 at 1:47 pm
GilaMonster (10/22/2012)
No, it means the size of the columns you've chosen as key columns. If it meant the size of the index (which we're trying to calculate) it would be a rather recursive definition.
Got it. Thanks Gail.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply