Search Results for: Thank+You

The Only Valid Test of a Backup is a Restore

Please, let me reiterate: The only valid test of a backup is a restore. THE ONLY VALID TEST OF A BACKUP IS A RESTORE. I'm happy that you have backups. That's great. Can you restore them? Let's tell a story. I Play With Radios "WE KNOW! SHUT UP ABOUT IT! Damn radio people. Worse than crossfitters." Cool, cool! I won't get into the radio stuff.... too much. Just a quick setup. Please bear with me. There's an organization in the US, American Radio Relay League (ARRL). Founded back in the dawn of time, more or less the first radio club. Now, the ARRL does a lot of stuff for radio users in the US, but also everywhere, but there's controversy (when isn't there). One thing they did was build this…
Read More

Only Capture Extended Events For a Given Time

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

Six Months!

Oh good gosh. Six months without a single blog post. Most important information: I'm not dead. Apologies. The issue is pretty simple. I'm getting old. Ha! Seriously though, I am suffering a bit from a lack of energy to do ALL the things and still maintain this blog. However, to hell with that. Time for a refresh. Watch this space. I'm going to be cleaning it up. Changing a few things. Also, getting back to posting. I don't think as many of the posts will be technical though. I'm going to start posting some leadership ideas and suggestions. I've been involved in community for a long time, and I want to see it keep going. I have received so much from the communities I'm involved with, I want to give…
Read More

T-SQL Tuesday #166: Wrap-up

Once more, my apologies for being late on getting the T-SQL Tuesday announcement out. I have no excuse. However, our extended event on Extended Events (yes, I'm the third person to make this joke, yes, I'm blatantly stealing) still has several entries, so let's talk about them. Let's get mine out of the way. I was simply curious what the search engines revealed when I asked a pretty common question: how do you identify slow queries? What I found was, the answers on most search engines to this question are old, very old. Not to say wrong, but since many of them were created before a working version of Extended Events (let alone Query Store) was released, how could they tell you. On to actually good posts. One of my…
Read More

State of the Database Landscape Survey 2023

As data professionals, of any stripe, we should, as much as we can, where we can, base our decisions on data. After all, in theory anyway, we're the experts at making that possible for others. We should lead the way on it. However, how do you know how others are implementing, oh, I don't know, cloud migrations, or multi-platform database management? What kind of success are they having? Where are they facing challenges? Well, one mechanism for answering these questions this is to simply ask. State of the Database Landscape Survey 2023 Yep. That's exactly what we're doing. We're asking you, and your peers, how you're doing. More, we're asking you how you're doing it. Please, help us out. Follow this link and fill out your information. Whether you're literally…
Read More

ChatGPT Lied To Me

I've been seeing more and more noise about how ChatGPT can help with technical stuff, writing code, all that. Well, I wanted to know how best to set up Query Store in SQL Server 2022, so I asked it. I'm not going to say this any other way, ChatGPT lied to me. Here's the conversation. I'm in italics. The Conversation With ChatGPT What are the best settings for Query Store in SQL Server 2022 Query Store is a powerful feature in SQL Server 2022 that helps in monitoring query performance and identifying query regressions over time. However, setting up Query Store requires careful consideration of several factors, including the size of the database, the frequency of queries, and the query workload. Here are some best practices for configuring Query Store…
Read More

#PGSQLPhriday 006: Wrap Up & Summary

Your mission, if you chose to accept it, was to share a single tip/hint/fact/something that you wish you'd known about PostgreSQL when you were just getting started learning it. Well, we've got several people who have put together some excellent posts. Let's go over 'em all, in no particular order. First up, Lætitia Avrot has a post all about the PostgreSQL documentation and it is well worth the read. I couldn't agree more with all her points. Plus, I love, love, LOVE the summary list of pointers to documentation broken down by role. Thanks so much for sharing all this. I also wrote a post about the docs. Lætitia covers them better. Next, Andreas Scherbaum has some very cool tips for using psql. My knowledge here is a bit slim.…
Read More

Check Every Metric

Recently, a person asked about the costs differences in an execution plan, referencing them as if they were performance measures. The key to understanding performance is to check every metric. When it comes to execution plans, I'm sure I've said this before, so please allow me to repeat myself. The cost numbers shown in an execution plan, which, barring a recompile, will be the same for an execution plan or an execution plan with runtime metrics (aka, estimated and actual plans), are not measures of performance. They do not represent actual metrics. Instead, they are calculations of a theoretical actual performance measurement. So, you can't look at two plans, with two costs, and say, "this plan will perform better." Instead, you can say, "this plan has a lower estimated cost."…
Read More

Extended Events for Anything but Query Tuning: bulk_insert_usage

Wouldn't it be great to be able to directly monitor specific behaviors within SQL Server, like, oh, I don't know, knowing exactly when, and how, someone is using BULK INSERT? Well, you can, thanks to Extended Events through the bulk_insert_usage event. Bulk_insert_usage The BULK INSERT command is extremely useful within SQL Server. It's a way to move data into the database and provide some formatting on the way, efficiently, all through T-SQL. Hard to argue with the utility. Obviously, if you're doing traditional data collection through Trace or Extended Events, you'll see BULK INSERT commands within the T-SQL. However, Extended Events provides a specific event that tracks just the behavior of BULK INSERT: bulk_insert_usage. Documentation on this is somewhat sparse. Some of the best is from a standard source, Jason…
Read More

Look Into Chocolatey

Just a suggestion, but I'd say you should look into Chocolatey. Let me explain why. Sabbatical For those who don't know I was recently on a six-week sabbatical from work (thank you Redgate) and I tacked a week of vacation to that. While I did clean out email during that time (can you imagine coming back to seven weeks worth... <shudder>), I didn't do software updates of any kind. In the meantime, Docker was updated. VSCode, SSMS, a whole slew of others. Not to mention, the busy little beavers at Redgate released umpty-million updates. My machine needed love, so I typed the following: choco upgrade all -y Then I went to get some coffee. Why? Because all that software that was out of date, it was getting updated, automatically by…
Read More