AI in the DBeaver Query Editor

PostgreSQL
You know I had to do it as soon as I found it was possible. Yes, I installed and enabled AI in the DBeaver Query Editor so I can use AI with my PostgreSQL database work. Let's face it. It was inevitable. However, the setup isn't intuitive. Setting Up in DBeaver I'm going to assume you're on the Community Edition of DBeaver. First, got to the "Help" menu and then "New Software". A window will open up. Right at the top is a drop down labeled "Work with." Select that and then select "DBeaver - AI support - https://dbeaver.io/update/ai/latest/." Next, select "DBeaver AI Support" down in the window and it should look like this: At the bottom of the screen you can pick finish, or hit next and review stuff.…
Read More

Can AI Read Execution Plans?

SQL Server
Yeah, yeah, second AI post in a row. I promise not to make a habit of it. But I saw someone else mention that you can feed them XML and the AI will read the execution plan. I had to test it out and then overshare my results with all of you. We Need A Query Here's a query: SELECT c.CustomerID, a.City, s.Name, st.Name FROM Sales.Customer AS c JOIN Sales.Store AS s ON c.StoreID = s.BusinessEntityID JOIN Sales.SalesTerritory AS st ON c.TerritoryID = st.TerritoryID JOIN Person.BusinessEntityAddress AS bea ON c.CustomerID = bea.BusinessEntityID JOIN Person.Address AS a ON bea.AddressID = a.AddressID JOIN Person.StateProvince AS sp ON a.StateProvinceID = sp.StateProvinceID WHERE st.Name = 'Northeast' AND sp.Name = 'New York'; This query results in this execution plan: There are some tuning opportunities here.…
Read More

Using AI for Data Conversion

Tools
I'm sure I've never mentioned that I'm an amateur radio operator. Like Vegans and Cross Fitters, we tend to be shy and withdrawn about our predilections. BWA-HA-HA! Ok, like Vegans and Cross Fitters, you can't get a ham to shut up about playing radio. Anyhoo, I've been experimenting with a brand new, and somewhat buggy, radio, the Baofeng DM-32UV. I'm writing this blog post about how I am using an AI for data conversion to make it a little easier to use this radio. The Problem The DM-32 is a Digital Mobile Radio (DMR) as well as an analog radio. You can follow the link to understand all that DMR represents when talking radios. I want to focus on the fact that you have to program the behaviors into a…
Read More

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

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

ChatGPT Lied To Me

Data Science
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