[Updated 13th April 2012 12:27 am] Note: Jonathan Kehayias (Blog) pointed out that some of his work is being referenced but not cited. Since it is a series, I was under the impression that all references could be published at the end; but Jonathan updated me that it should be there with each post. So it is mentioned at the end of this post. Regret for the anxiety caused. Thanks Jonathan. I will be updating other posts int his series.Unlike previous versions, SQL Server 2012 provides more details on page splits. You you all would have seen in the first part of the series, that page split can be an event, where a new page added to the table.
The page split we should be worried is an existing page splits to accommodate either a new or an existing row.
In SQL Server 2012 extended events, we can track the database, the sql statement which caused the page split and even the type of page split.
Lets use this example: Lets select the page split test, extended event session and (if it is stopped , start and) open the watch live data. (There could be a delay in showing the events int he screen, but they are captured live)
Now execute the following script
IF DB_ID('page_split') IS NULLcreate database page_split;gouse page_splitgoIF Object_Id('dbo.Note') IS NOT NULLdrop table NoteGOCREATE TABLE dbo.Note(NoteID int NOT NULL CONSTRAINT PK_Note PRIMARY KEY CLUSTERED (NoteID),NoteText char(1300) NOT NULL)GOInsert into dbo.Note Values (1,REPLICATE('a', 1300));GOInsert into dbo.Note Values (2,REPLICATE('b', 1300));GOInsert into dbo.Note Values (3,REPLICATE('c', 1300));GO-- The row with NoteID = 4 is missing hereGOInsert into dbo.Note Values (5,REPLICATE('e', 1300));GOInsert into dbo.Note Values (6,REPLICATE('f', 1300));GOInsert into dbo.Note Values (7,REPLICATE('g', 1300));GOInsert into dbo.Note Values (4,REPLICATE('d', 1300));GO
When the code is executed, we can see three page split related information getting into our watch window.
(Lets add the following columns from details section to the table view: database_name, SplitOperation, new_page_file_id, new_page_page_id, page_id, sql_text)The watch window will look like this:

