Transitioning From SQL Server Profiler To Extended Events
- Posted in:
- Database Administration
- SQL Server
My first introduction to Extended Events happened a couple of years ago when I first learned SQL Server Profiler was deprecated. I'm not sure when Microsoft made the announcement, but by the time I found out, I think it had been known for quite a while. I opened SSMS, delved down to the Extended Events node, and fired up the New Session Wizard. I'm sure I fumbled around awkwardly for a while, did some Googling, fumbled around some more, and eventually cobbled together a session that kinda sorta mimicked a common Profiler trace I'd use for performance.
Thinking back, my initial reaction was probably something like "I don't get it.". XEvents just seemed like a new dog performing an old trick. Even though I concluded most of the SQL pros had already made the transition to Extended Events (XEvents), and that I'd be living in the past if I didn't do the same, I continued to use Profiler. It's too bad--my current employer at the time had SQL 2012 across the board. I missed a great opportunity there. Before I left that job, I stumbled upon this Paul Randal post. It helped me trouble-shoot a performance issue with a stored proc. "Ok, so there's one thing XEvents can do that Profiler can't do" I thought to myself. (Note: I don't know if that's a true sentiment or not--I never investigated further.) I also recall reading at least one of Jonathon Kehayias' (b|t) posts about XEvents, but I don't remember which one. Profiler would remain my go-to tool for the remainder of my time with that employer.
When I came on board with my current employer, I continued to use Profiler. There wasn't a good reason to use XEvents when I started--the newest version of SQL we were running was 2008 R2. Despite our use of "older" SQL versions, I continued to invest time in my career development and learn about the more recent SQL releases. I found myself reading more technical articles than I ever had before. I joined PASS. I found the treasure trove of videos there, including "Making the Leap from Profiler to Extended Events" by Erin Stellato (b|t) from PASS 2013. That is what changed things for me. Erin presents a compelling case for XEvents over Profiler. But I'll let you decide for yourself.
Extended Events - Recent Experience
A few months back, I got the green light to upgrade all of our SQL hosts. The oldest version I support will soon be SQL 2012. When I started upgrading the SQL 2008 R2 instances, I made the commitment to only use XEvents on SQL 2012+. I don't have the need to run a trace very often. When I do, it's almost always some derivative of a "performance" template. There is a session I created with the Session Wizard, which I've saved as a tsql script. I use it to create an identical XEvent session on every 2012+ instance. I only start the session as needed, which is not very often. If I need to tweak the session, I make whatever changes are needed using the UI in SSMS. After I'm done with the session, I'll either rename it and save it for later or delete it. Then I'll re-create my "standard" performance XEvent session from script again. Pretty easy.
What I Like
What I Don't Like
Hits And Misses
- Live Data Grid
- I like that the Live Data Grid is highly configurable. You can pick which columns to show in the table, search within columns, filter by column values, copy cell/row values to the copy/paste buffer, bookmark one or more rows for ease of navigation within the grid, sort by column, group by column, etc.
- When there's a huge number of results, the grid feels really sluggish and slow. Maybe SSMS is to blame, not XEvents per se. Perhaps this is simply the reality of a UI element holding a huge cache of data.
- Selecting Multiple Events
What's The Point?
XEvents is pretty good, but it seems there is a significant group among us that continues to use and prefer SQL Profiler. A Tweet promoting Erin Stellato's webinar on XEvents led to a Profiler vs XEvents TwitterStorm. A few days after the dust settled, Erin asked Why do YOU avoid Extended Events? I felt I had too much to say within the constraints of the comments section, thus this post. If you have some input, I'd encourage you to add to the comments section on Erin's site.
Comments