#PGSQLPhriday 006: Wrap Up & Summary

PostgreSQL
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

#PGSQLPhriday 006: What I Wish I Knew While Learning PostgreSQL

PostgreSQL
Well, for those who don't know me, I'm just barely started on my PostgreSQL journey. So, what the heck can I contribute to this conversation? Not much, but I do have one tip. It's about the official documentation and search engines. YaDuBiGo When you use Yahoo, DuckDuckGo, Bing, Google, or whatever search engine you use, what you don't get is a simple, "here are the pages you asked for". All the search engines use various mechanisms to surface you "here's the BEST and MOST POPULAR pages you asked for." What defines best in these circumstances? Most accurate? Maybe, maybe not. I've never worked for one of these organizations and they tend to keep their algorithms to themselves, for obvious reasons, both good & evil. However, I do know one thing…
Read More

What Happens on Azure SQL Database?

Azure, SQL Server
Last week I posted the results from using Extended Events to snoop on what happens inside an AWS RDS database. This week, I'm taking a look at what happens on Azure SQL Database. I'm using the same toolset again, if for no other reason that I'm consistent in my approach. So it's basically just rpc_completed & sql_batch_completed on the database in question. Let's check out the results. What Happens on Azure SQL Database I would be doing the same thing as before, breaking apart the batch commands from the stored procs and/or prepared statements. However, after 48 hours, I only have 116 of both, so I'm just going to combine them this time. The batch called most frequently, for a whopping total of 8 times over 48 hours, isn't even…
Read More

One Thing You Wish You Knew While Learning PostgreSQL: PGSqlPhriday #006

PostgreSQL
I will not even attempt to hide it, I'm very much in the learning phase of my PostgreSQL journey. As such, I'm constantly picking up new facts. However, I'm interested in that one thing that you wish someone had told you. That tiny bit of "AH HA!!!" information that you have now, but it took you a while to find. Just that teeniest, tiniest slice of the behavior of PostgreSQL that proved to be a game-changer for you. In short, help me and all the others out there trying to learn this stuff. Make learning PostgreSQL just a little bit faster & easier for us. Please. Why am I asking? Because this is all a part of #PGSqlPhriday 006. What is #PGSqlPhriday and how do I participate? As to what…
Read More

What Happens On AWS RDS?

AWS, RDS
I was talking with some developers from my team about monitoring, and I said, "We all use the same tools," referring to other monitoring software. Then, it hit me. How is AWS collecting monitoring data on it's RDS servers, specifically, the SQL Server instances. So, I set out to determine what happens on AWS RDS when it comes to the native monitoring. The Setup This part should be as obvious as it is easy. I'm going to use Extended Events. I've written before about how AWS RDS supports Extended Events, so I won't repeat all that here. I'll just leave you with the session I'm running to see what happens on AWS RDS: CREATE EVENT SESSION [ExEventTesting] ON SERVER ADD EVENT sqlserver.rpc_completed, ADD EVENT sqlserver.sql_batch_completed ADD TARGET package0.event_file (SET filename…
Read More

Queries Impacting TempDB

Uncategorized
The question came up that someone wanted to monitor the queries impacting tempdb using Extended Events. Initially, I was pretty sure that there was no real way to do this. The standard query events like rpc_completed includes spill information, if any occurred, but that's it. There are also no actions that you can add to an event that would capture tempdb behaviors. So, I want to my senior DBA, YaDuBiGle. I found this ancient (2009) article on SQLTips, that surprised me with a pretty slick solution using, are you ready, waits. Clever. How well does it work? Let's try it out. Testing Capturing Queries Impacting TempDB I'm not stealing their code, so you can follow the link to see the setup. I'm much more interested in the results. How well…
Read More

Query Store Data Cleanup

SQL Server
Microsoft supplies quite a few knobs to control how Query Store performs data cleanup. You can set your cleanup various ways, and, they interact. Let's talk about how and why Query Store does it's data cleanup. Query Store Size Limit The most important thing to understand here is that Query Store won't just keep collecting data forever, filling your hard drive. There is a hard limit to how much data Query Store contains. By default, prior to 2019, that was 100mb. After 2019, it's 1,000mb. You can, of course, adjust this up, or down, as needed on your systems. It's a database-by-database setting (as so much of Query Store is). You can change this through SSMS: Change the "Max Size (MB)" value. That's it. Nice & simple. You can also…
Read More

Presenting On Basics Is Difficult

Professional Development
Over the last year, at work and after work, I've been teaching myself a lot of brand new technologies. As such, I'm reliant on others to have put together coherent, approachable, documentation, classes and videos. Let me tell you up front, that is not always the case. There are a lot of videos out there, that have the information you need, but it's presented so poorly that it's almost incomprehensible. Let's talk about it. Mea Culpa Please let me start with the full knowledge that I've frequently failed in this myself while presenting. I'm not talking to you now from the top of the mountain. I'm absolutely talking to you as a peer who is suffering along side you. I've spent my entire tech career teaching others (more than 30…
Read More

PGSQL PHRIDAY #3: What is the PostgreSQL Community To You?

PostgreSQL
Very excited to take part in my third #PGSQLPhriday blogging event, even more so because it's a topic that's quite near and dear to my heart, community. To say that I'm new to the PostgreSQL community isn't simply an understatement. Other than some online stuff, I haven't been anywhere near the PostgreSQL community. That's not for a lack of trying (multiple sessions submitted to multiple events), but so far, still just doing the online thing. So, I don't know that I'm fully qualified to discuss what, specifically, the PostgreSQL community means to me. Instead, let's talk about why you want a vibrant and strong community. I'm going to start with my qualifications to discuss community (not that anyone, anywhere, needs qualifications to take part in community, man, I dislike gatekeeping).…
Read More