IT tutorials
 
Database
 

Creating Extended Events Sessions in SQL Server 2012 (part 3) - Monitoring for Page Splits with Extended Events

12/19/2013 1:40:13 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Monitoring for Page Splits with Extended Events

After seeing the login example in action you may be thinking that you have yet to see Extended Events do anything you couldn’t do just as easily with a tool like Profiler. As you’ll see in the next example, it’s just as easy to capture information that has not been so easy to access previously. This example forces a clustered index to perform several page splits, demonstrating how you can use Extended Events to monitor both the page splits that are happening and which SQL Server statements caused them.

As with the previous example, Figure 10 shows the session configuration relevant to capturing the page split events; how you configure the rest of the session and its event file target is not so important. Also added, but not shown, is the database_name field; if you don’t add this you’ll just get the database_id, which may still be enough information for your troubleshooting.

FIGURE 10

image

After creating and starting the session, it’s time to force some page split activity for it to capture. The following script will set up a simple database and table before allowing you to cause page splits on demand with an insert statement:

create database PSDemo
go
use PSDemo
go

create table t1 (ID uniqueidentifier default newid(),
val1 char(8000), val2 char(37))
go
create clustered index idx_t1 on t1(ID)
go

insert t1 (val1, val2) values (’X’,’Y’)
go

-- Repeat this insert statement as often as you want to cause splits
insert t1 (val1, val2) (select val1, val2 from t1)
go

After executing the script you’ll be able to see just how frequently page splits occur as a database begins to be populated, especially with a table design that was chosen to exaggerate the frequency of page splits. An example of one of the page split events captured is shown in Figure 11.

FIGURE 11

image
 
Others
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us