What Are the Most Common Blockers to Adopting SQL Server Extended Events?

SQL Server
Yeah, stupid long title. It's a question I put to several different AI engines. I'm curious what the aggregated knowledge of the internet has to say on the topic of blockers to Extended Events adoption. I'll leave it to you to do the search on your favorite engine and get the wordy, long-winded, answers. However, I want to bring up some of the points that were raised in order to talk about them. First, we'll talk about some of the odd answers. Then, we'll talk about the consensus. Also, one engine gave me a blatantly poor example Session, so I want to point that out. Note: I'm not dinging on AIs. I'm growing to like the little monsters. We're going to address valid points that they bring up. However, I…
Read More

State of the Database Landscape Survey 2024

Professional Development
Hello all! This post is nothing but a simple request. Please, if you have a few spare minutes, meander on over to this link and fill out the State of the Database Landscape Survey for 2024. Yeah, it's for Redgate Software, my employer. But, really, it's for everyone. Why is it for everyone? Because, every time we do one of these surveys, we don't sit on the data, we share it. Here are the results from the 2023 survey, published earlier this year. Yeah, but, I hear you opining, what does this really do for me? Well, let's talk about it. Consuming Survey Results On the one hand, who cares. Gotta get to work. Reading about what other people are doing has no bearing on me. True. To a degree.…
Read More

Observing Extended Events

SQL Server, You Can't Do That In Profiler
Sure, you can right click on a running session for Extended Events and open the Live Data window, but are there other ways of observing what Extended Events is capturing? Yes. Extended Events Output Let me just get out of the way immediately, there's probably a way to do this programmatically with DBATools. I need to dig in there, and I'll post what I find. But what can we do right now? SQL Server Management Studio (SSMS). Here are all the sessions currently on my test/demo machine: Some of these are built in, system_health for example. Most of the rest are mine. So, how can we see what they do? Well, notice that every one has a little plus sign next to it: If we click on the plus sign,…
Read More

PostgreSQL and Instrumentation

PostgreSQL
I'm still learning PostgreSQL and one of the things I've been looking at a lot lately is instrumentation. What do I mean? Well, if you're in SQL Server, think, Dynamic Management Views (DMV), Extended Events, Query Store, <hack, spit> Trace <spit>. How do we know how long a query took to run? PostgreSQL can tell you, but, and this is one of those wild, cool, but, honestly, slightly frustrating things about PostgreSQL, not natively. Let's talk about it. Instrumentation If you connect up to a PostgreSQL database, you actually do have the equivalent of DMVs. It's called the Cumulative Statistics System. And yeah, it's a bunch of views on a bunch of functions. It displays all sorts of data about IO, tables, indexes, etc.. It will even show you acive…
Read More

Kilt Day!

Uncategorized
This is a quick blog post to announce that I am reviving Kilt Day at PASS Data Community Summit. Over the last few years... ah hell, let's just say it. I'm old. Without equivocation, no reserve, I love PASS Summit. But holy smokes it's exhausting. Especially the last few years. What's changed? Me. I'm getting old. So, I looked around at things I could trim, stuff I could avoid, ways I could be both be a bit more comfortable and just take some load off my shoulders. Kilt Day. I tried to get others to "run" it. No one did. It's a bit inexplicable because, there's nothing to it. Announce it. Advertise it (this is the "hard" part). Keep advertising it. Show up in a kilt. That's pretty much it.…
Read More

Use Your Voice

Professional Development
If you want more of a career and less of a job, one thing you will have to do is learn to use your voice. I mean this on multiple levels, so let's talk about it. Volume, Tone & All That Stuff When I say "learn to use your voice," one of the things I mean is that you will need to spend some time learning how to literally, physically, speak. It takes some practice to understand how to increase your volume so people can hear it you without actually shouting. If you have to speak for an hour or more, controlling tone and volume does take time to learn. I know people who can't talk long without hurting their vocal cords. If you're one of those people, track down…
Read More

Only Capture Extended Events For a Given Time

SQL Server
It's a great question. Let's say you want to capture stored procedure completions. But, you only want to capture them between 3AM and 4AM. Can you do it? Output of rpc_completed Let's create a really simple event: CREATE EVENT SESSION [RPCTimeBoxed] ON SERVER ADD EVENT sqlserver.rpc_completed(SET collect_statement=(1) WHERE ([sqlserver].[database_name]=N'AdventureWorks')); If we start this event, run some code, the output within the Data Explorer window looks like this: Just a couple of points here. Notice the fields in the event. None of them are dates or times. However, up above, we get the timestamp column. Done, right? Let's use that. But first, what does AI, through CoPilot tell me? CoPilot To The Rescue? I asked CoPilot. It took a couple of refinements to get it on board with the idea that…
Read More

Data Technology Learning Resources

AWS, Azure, Database Fundamentals, PostgreSQL, SQL Server
Hey all! Quick one here. Tracy Boggiano, awesome person that she is, has put together an interesting collection of data over on GitHub. It's titled DBA Resources, but it goes beyond DBAs. It's much more about the different data platforms on display. And, it's in Github. Create a pull request and you can add to it. Get your own blog on there, whatever. Anyhoo, worth a look. I'm going to do some contributions. Oh, AND, it's multi-platform, cause, isn't everything these days.
Read More

Exploring Window Functions Execution Plans

SQL Server
There are quite a few different ways that you're likely to see window functions evidence themselves within your execution plan. Let's take a look at one example. Window Functions For our example, I've got a pretty simple query: SELECT soh.CustomerID, soh.SubTotal, ROW_NUMBER() OVER (PARTITION BY soh.CustomerID ORDER BY soh.OrderDate ASC) AS RowNum, Soh.OrderDate FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate BETWEEN '1/1/2013' AND '7/1/2013' ORDER BY RowNum DESC, soh.OrderDate; Nothing to it really. What kind of execution plan does this generate? Here's the plan with runtime metrics (aka, an actual plan): I showed the missing index suggestion (and let's remember, they're just suggestions) just for completion and to show I'm not hiding anything. Potentially, adding an index could speed up the query. However, that doesn't affect what we're going to talk…
Read More

The Community is YOU, Not Any Organization

Professional Development
As I type this, we're leaving behind spring, and all the amazing events that take place then, and entering the quiet time of summer. After that, we'll go into the fall and hundreds of community events (feels like hundreds) will kick off again. Before all that, I wanted to share what I think is an important message: The community is you. Let's talk about it. What Really Defines Community First up, community is not an organization. Sure, organizations can and do support and define communities, but they themselves are not the community. The community is, at the core, down to the people that make it up. The social norms we build around our communication with one another, interests, methods, values, these are what define a community. And yes, a good…
Read More