Thank You Allen!

Uncategorized
I know I can say that I'm a friend of Allen White without getting into trouble. Allen and I have a shared a lot of things over the years and I'm inordinately pleased that I know the man. Thanks Allen. Allen was the very first person, ever, to say to me "Say, aren't you Grant Fritchey? You wrote that book on Execution Plans." To say I was blown away that anyone, anywhere, would recognize me, well, there's simply no way to understate this. Thank you, Allen, for the recognition. Allen has always been one of the clever ones. He was up and using Powershell almost before it was released, or so it seemed. When I was just barely starting to figure out the kind of automation I live by now,…
Read More

Extended Events for Anything But Query Tuning: xml_deadlock_report_filtered

SQL Server
One of my favorite little bits of information about Extended Events is the fact that everyone running a full instance of SQL Server has deadlock information available to them, even if they never enabled Trace Flag 1222 through the system_health session. That captures the xml_deadlock_report which has the full deadlock graph. However, what if you want to capture deadlock info, but, you're dealing the GDPR, and transmitting query values could be problematic? Enter xml_deadlock_report_filtered. xml_deadlock_report_filtered If you do a search for this event, you're not going to find much. Doesn't seem like anyone, including Microsoft, has bothered to document it. This is not going to be a comprehensive definition for all things xml_deadlock_report_filtered. However, I can show you why you might want to use it. This is a port of…
Read More

Goodbye to Good Morning!

Professional Development
For two years and three months, since April 2020, I've posted a tweet saying "Good Morning!" on every workday. I think I missed one. I was late for a couple. The messages were meant to be helpful. I used the word kind a lot. A lot. I tried to avoid lectures, and still did it sometimes. I tried to always be uplifting and positive, yet was still a downer occasionally. I've received many thanks for the tweets, in public and private. I cherish every one. Thank you! I also received quite a few "how dare you" and "you're not qualified" messages. For those, my answers are simple. I dare fine. You're right, I'm not qualified, doing it anyway. However, I'm drawing all that to a close. See, I'm going on…
Read More

Thank You Kevin!

Uncategorized
I don't think I'm going too far out on a limb to call Kevin Kline a friend. I'm extremely humbled and honored that I can say that. Kevin is just a good person. Thanks, Kevin. Years ago, on a guess, about 12-13, I was talking with Tom LaRock, another great guy, and we both said, "Damn, I wish I had Kevin's job". Kevin has been an evangelist/advocate for a few different organizations over the years. Within a year, Tom did. About another year after that, so did I. However, Kevin lead the way. He showed us what a good advocate looked like. Thanks Kevin. I wouldn't have my outstanding job if it weren't for you showing me how. Kevin was also one of the founding members of what was the…
Read More

Extended Events for Anything But Query Tuning: Unique Constraint Violations

SQL Server
Most of the time when I talk about or demo Extended Events, I spend more time talking about query tuning (I have a problem). However, there are tons of things that you can do with Extended Events. Here's a little one that came up, auditing unique constraint violations. Unique Constraint Violations Whether we're talking a primary key or just a constraint, the error you get is number 2627 when you attempt to add a non-unique value. So, the code for a simple way to track this in Extended Events would look like this: CREATE EVENT SESSION [UniqueConstraintViolation] ON SERVER ADD EVENT sqlserver.error_reported (WHERE ([error_number] = (2627))); That's it. That's all you need. Probably, it'd be a good idea to output this to a file (that's usually what I do). However,…
Read More

2022 State of PostgreSQL Survey

PostgreSQL
Hello all. I know most of you are still working within SQL Server. However, a few of you are become more like me, hybrid data managers, working in more than one platform. For those currently doing a little PostgreSQL management, I'd like to point out to you the 2022 State of PostgreSQL survey. These kinds of things are great ways to understand where the technology is headed, your place on that path, and how well your organization is doing with the management of PostgreSQL compared to others. If you have a couple of minutes, please follow the link and fill out the survey. And watch this space for a lot more SQL Server content coming up. I'm rewriting my query tuning book, from scratch, so lots of stuff in my…
Read More

PostgreSQL and Azure Data Studio

PostgreSQL
As I've been working more with PostgreSQL, I've found that I'm basically pretty happy just issuing SQL commands to get work done. However, it's handy to have an actual programming environment to work from. A few reasons for this. First, and probably most important, a good programming environment has easy connections to source control. Also, you'll get, hopefully, some help with type-ahead for the code you're writing. Finally, having a visual of the stuff in your database can be handy while working on it, so a GUI is nice. I use Azure Data Studio for most of my PostgreSQL work. Azure Data Studio and PostgreSQL I'm not sure exactly when support for PostgreSQL was added. The two years I've been poking around with PostgreSQL, Azure Data Studio (ADS) has supported…
Read More

Extended Events in AWS RDS

AWS, RDS
For the longest time, we didn't have one of the most useful tools for monitoring SQL Server behavior, but I just found out that, indeed, you can use Extended Events in AWS RDS. I'm not waiting around. Let's see it in action. Setup For Extended Events in AWS RDS AWS has posted the documentation on what you have to do in order to enable the collection of Extended Events within RDS. Normallly, I'd follow along with the documentation. However, I'm going to approach this like I knew that Extended Events support was there, but I wasn't aware of the docs. So, I'm starting in SSMS and I'm just going to try plugging in the Extended Events GUI to see what happens. Further, I'm going to use the simplest method for…
Read More

Query Tuning and Easy Solutions

SQL Server
TLDR: There ain't one. I was privileged last week to be able to present a couple of sessions at the SQL Server and Azure SQL Conference (great event, I recommend it). One of my sessions was an intro to query tuning. Basically, I went through a bunch of common code smells and suggested different possible solutions. The one thing that came up, both from my own stories and the questions from the (engaged) audience, is just how much everyone wants a magic, run fast, switch. Query Tuning The Easy Way Here you go. The single easiest way to make your queries run faster: Just throw money at the problem. Buy more hardware. Buy bigger hardware. Get more disks and disk controllers (not just more disks). Go to the next highest…
Read More

Two Years of “Good Morning!”

Professional Development
Two years ago at the start of the pandemic, I wasn't feeling great about things. I saw that quite a few others weren't all that thrilled about how things were going either. So, to help my own mood, and to try to be a service to others, I started tweeting a little "Good Morning!" post every work day. I filled them with happy thoughts, tips I'd read on handling depression, suggestions I learned on health, anything that would help people, just a teeny amount, at the start of the day. Now, I'm not some licensed therapist or anything like that. I just wanted to do something to help others where I know I needed help. That's it. Two years later and I've written a bunch of tweets. Based on feedback…
Read More