|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 2:01 PM
Points: 1,559,
Visits: 1,404
|
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 3:51 AM
Points: 3,163,
Visits: 4,342
|
|
Good question.
____________________________________________ Space, the final frontier? not any more... All limits henceforth are self-imposed. “libera tute vulgaris ex”
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 7:11 AM
Points: 877,
Visits: 1,159
|
|
Nice question. Thanks
Thanks
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, June 13, 2013 8:50 PM
Points: 3,208,
Visits: 4,178
|
|
Good question, but there is a link to BOL/articles/etc missing in the explanation. Should I take the explanation on trust?
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Today @ 3:11 AM
Points: 1,777,
Visits: 1,320
|
|
Good Question, Thank you!!!
--------------------------------------------------- "Thare are only 10 types of people in the world: Those who understand binary, and those who don't."
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 3:04 AM
Points: 1,270,
Visits: 4,306
|
|
| I had a suspicion that the obvious answer was going to be wrong, but I selected it anyway because I was curious to see what the actual answer was. One wonders why they don't call that value Pages Allocated/sec rather than Page Splits/sec!
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Wednesday, June 12, 2013 11:07 AM
Points: 586,
Visits: 365
|
|
More of these types of questions please! Good way to start the day.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 2:01 PM
Points: 1,559,
Visits: 1,404
|
|
It is not documented in BOL. It may be documented in some of the books on SQL Server internals. If so, I don't remember which one(s).
It is easy to prove simply set up a test where you are inserting sequential, ever-increasing data into a table so that there are no page splits, only allocations for new pages, and watch the performance counter.
My blog: SQL Soldier Twitter: @SQLSoldier Microsoft Certified Master: SQL Server 2008 Sr. Product Consultant and Chief SQL Server Evangelist @ Idera My book: Pro SQL Server 2008 Mirroring
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Yesterday @ 2:43 PM
Points: 10,990,
Visits: 10,576
|
|
Robert,
I have some (hopefully viewed as constructive) criticisms:
The observed behaviour only applies to clustered tables - heap table inserts never cause page splits. Heap inserts are not counted by the "Access Methods:Page Splits/sec" counter, though they do naturally affect "Access Methods:Pages Allocated/sec".
Minimally-logged operations (even on a clustered table) do not cause "page splits" and so again only affect the 'pages allocated' counter. Taking the example of inserting into a SQL Server 2008 table clustered on a monotonically-increasing key, we observe zero page splits (but very many allocations) if the table is empty to begin with, and trace flag 610 is specified. I chose this example because it is minimally logged even under the FULL recovery model - the same behaviour applies to all other minimally-logged operations.
Adding a new page at the 'end' of the clustered index is indeed a page split: the new row is too large to fit on the last page, so it must split. Not moving any rows from the 'split' page is an optimization for this special case. Nevertheless, it explains why this operation counts as a page split.
The question explanation would have benefited from a reference - even if not officially documented. My recollection is that one of Kalen's internals books contains a reference to new page allocations in a clustered index being counted as a page split, though it does not (from memory) explain why.
The explanation given for the fourth answer option could have been worded more clearly, and again would have benefited from a reference to the internals book that explores that behaviour. QotD is useful to many people as a learning tool - so it makes sense to point them in the right direction if you can.
Paul
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Yesterday @ 2:43 PM
Points: 10,990,
Visits: 10,576
|
|
paul.knibbs (9/15/2010) One wonders why they don't call that value Pages Allocated/sec rather than Page Splits/sec! Both counters exist, but they measure different things 
You may find some of the information and results in the following MSDN Best Practices article useful: http://msdn.microsoft.com/en-us/library/cc917672.aspx
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|