Extended Events Misperceptions: Profiler is Easier, Part 2

SQL Server, Tools
I wrote a short blog post about the misperception that Profiler was easier than Extended Events when it came to the core concept of "click, connect, BOOM, too much data". Go read it if you like, but I don't think it's actually an effective argument for how much easier Extended Events is than Profiler. Here, we're going to drill down on that concept in a real way. Let's start with a little clarification. I'm going to be a little lazy with my language. Trace is a scripted capture of events on a server. Profiler is a GUI for consuming a Trace, either live or from a file, and for creating Trace events. However, almost everyone refers to 'Profiler' when they mean either Trace or Profiler. I may do the same…
Read More

Microsoft Tools That Help Query Tuning

SQL Server, T-SQL, Tools
Query tuning is not easy. In fact, for a lot of people, you shouldn't even try. It's much easier to buy more, bigger, better hardware. Yeah, the query is still slow on newer, faster hardware, but not as a slow as it was. However, sooner or later, you're going to have to start to spend time fixing queries. In fact, you can find that fixing queries actually is more cost effective than buying more hardware. The problem is, query tuning is not easy. So, what do you do? Microsoft Can Help There are a number of tools available to you, right now, provided by Microsoft that can help you better and more easily tune your queries. This ranges from extended events to query store, and absolutely includes execution plans and…
Read More

Extended Events Misperceptions: Profiler is Easier

SQL Server
I know, I know, I'm on #teamexevents so I think that Extended Events can do no wrong, but let's address this thought that Profiler is easier. Now, if we're strictly talking knowledge, sure, if you've got a lot of experience with Profiler/Trace and very little with Extended Events, of course Profiler is easer. However, what I'm told is that Profiler doesn't require very much set up, while Extended Events does. That's just wrong, but let's put it to the test. The Test For the comparison, we're not going to do anything special with either tool. I'm just going to start collecting query data with the fewest possible clicks and/or key strokes. I'm going to use both tools short cuts to make this as fast as possible. The goal is, click,…
Read More

Causality Tracking in Extended Events

SQL Server
If you go through all the stuff I've written about Extended Events, you'll find that I use causality tracking quite a bit. However, I've never just talked about what causality tracking is and why I use it so frequently. Let's fix that issue now. Causality Tracking Causality tracking is quite simple to understand. It's property that you set for a given session. A session, of course, is defined by one or more events and a target. You can define things about a session, like it's name, when you define the session itself. Turning on, or enabling, causality tracking is just a matter of defining that the session will have causality tracking. It looks like this in the GUI: It looks like this in the T-SQL code: CREATE EVENT SESSION QueryBehavior…
Read More

Execution Plans: First Operator

SQL Server, T-SQL
The first time you see a new execution plan that you're examining to fix a performance problem, something broken, whatever, you should always start by looking at the first operator. First Operator The first operator is easily discerned (with an exception). It's the very first thing you see in a graphical execution plan, at the top, on the left. It says SELECT in this case: This is regardless of how you capture the execution plan (with an exception). Whether you're looking at an execution plan from the plan cache, Query Store, or through SSMS, the execution plan, regardless of complexity, has this first operator. In this case, it says UPDATE: If you get an execution plan plus runtime metrics (previously referred to as an "actual" execution plan), you'll still see…
Read More

Ending My Time as PASS President

PASS
With the end of the year, other things are coming to an end as well. Tomorrow, December 31st, will mark my final day as President of the PASS organization. I won't be leaving the board itself for another two years. I'll still be there as the Immediate Past President (IPP). I still have a vote on the board and will take part in supporting the next President, Wendy Pastrick (who is going to be great). While my role shifts, I'm also still a part of the Executive Committee. With all that, I can still act as a conduit into the board. If you have questions on what we do, how we do it, why we do it, please, ask. If you want information passed to the board, I'll be available…
Read More

Fritchey Family Christmas Movies

Uncategorized
MERRY CHRISTMAS! HAPPY YULETIDE! HAPPY HANUKKUH! Instead of something technical, let's take a moment to just kick back and enjoy a few great Christmas movies. Now, let's be clear. "It's a Wonderful Life", "Rudolph" and the rest also play at the Fritchey household, but we have a few, special, Christmas movies that I'd like to share. Welcome To The Party Pal! Most everyone can agree that, yes, in fact, Die Hard is very much a Christmas movie (as is Die Hard 2). However, my family enjoys the following films each (or most) Christmas season: The Thin Man: William Powell and Myrna Loy. What else needs to be said? However, wonderful Christmas murder mystery. Mrs. Scary won't let me shoot balloons of the tree though. Mrs Scary's favorite line: "I'll take…
Read More

Why Don’t People Use Columnstore Indexes?

Professional Development, SQL Server
I saw this question on SQL Server Central the other day and had an immediate, visceral reaction. I know why. Now, before I explain my answer, please, let me reassure you. I get it. You're busy. What I'm about to suggest is not meant as a direct critique of you. It's just an observation of the human condition. Heck, maybe I'm wrong. So, before you write the angry screed about how busy you are and why you can't possibly do what I'm about to suggest, believe me, I already understand. I'm still going to suggest something that's going to make some of you angry. Common Knowledge If you'll permit me, I want to talk about Extended Events before we talk about Columnstore. SIDE NOTE: Standing invitation, any time I'm at…
Read More

Distributing Jupyter Notebooks

Professional Development, SQL Server
If you're working with the Microsoft Data Platform, you should be, at the least, exploring Azure Data Studio as a new tool in your toolbox. One of the big reasons for this is the inclusion of Jupyter Notebooks. For those who don't know, Jupyter Notebooks are an open source documentation tool that lets you combine text and pictures with live code. From this we can talk about runbooks that you can share with people, lessons in combination with videos, presentations, interactive software documentation and lots more. I'm myopically focused at the moment on Azure Data Studio, but there are a lot of other places and ways to create or consume notebooks. However, I'm going to keep my focus. The issue I'm running into, is distributing the notebooks. Where to go…
Read More

State of Database DevOps Survey

Uncategorized
Maybe you're using DevOps within your database development and deployment. Maybe you're not. Maybe you're automating all the things or maybe you've got a completely manual set of processes. Fact is, Redgate would like to know. If you can spare a couple of minutes to swing by this link and fill out this survey, I'd sure appreciate it. The fact is, database deployments, regardless of the database, regardless of it being relational or not, can be very difficult. The core of the problem is retention of the existing data. If it was possible to deploy databases the same way we deploy code, throw away the old one, install the new one, usually in a single step, that would be great. However, unfortunately, throwing away databases usually gets organizations quite upset.…
Read More