Performance Counters

  • Comments posted to this topic are about the item Performance Counters


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • This was removed by the editor as SPAM

  • Nice question. Thanks

    Thanks

  • Good question, but there is a link to BOL/articles/etc missing in the explanation. Should I take the explanation on trust? 🙂

  • Good Question, Thank you!!!

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • 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!

  • More of these types of questions please! Good way to start the day.

  • 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[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • 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.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

  • 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

  • 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

  • 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