September 14, 2010 at 10:40 pm
Comments posted to this topic are about the item Performance Counters
September 14, 2010 at 11:34 pm
This was removed by the editor as SPAM
September 15, 2010 at 12:10 am
Nice question. Thanks
Thanks
September 15, 2010 at 12:31 am
Good question, but there is a link to BOL/articles/etc missing in the explanation. Should I take the explanation on trust? 🙂
September 15, 2010 at 3:26 am
Good Question, Thank you!!!
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
September 15, 2010 at 4:36 am
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!
September 15, 2010 at 7:12 am
More of these types of questions please! Good way to start the day.
September 15, 2010 at 7:16 am
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.
September 15, 2010 at 10:43 am
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
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
September 15, 2010 at 10:47 am
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
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
September 15, 2010 at 11:25 pm
Thanks for the QotD.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
September 16, 2010 at 2:08 am
Great question. Internal SQL Server stuff isn't exactly my forté, so it is always nice to have a QotD to crank up my knowledge.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 16, 2010 at 10:41 am
da-zero (9/16/2010)
Great question. Internal SQL Server stuff isn't exactly my forté, so it is always nice to have a QotD to crank up my knowledge.
Nice question. I gave the obvious answer, which was of course wrong.
Nice useful comments from Paul.
Tom
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply