Press "Enter" to skip to content

Curated SQL Posts

Monitoring Power Virtual Agent Chatbots

Devin Knight has a video for us:

Power Virtual Agents empowers subject matter experts to build intelligent conversational bots, using a guided, no-code graphical interface. In this video you will learn how to monitor how successful your chatbots are at answering your users questions. Using the monitoring capability you will uncover areas of your chatbot that can be improved.

If I were familiar enough with Latin, I’d try a play on “Quis custodiet ipsos custodes?” with this.

Comments closed

Aggregation and Indexed Views

Randolph West dives into the archives:

Ten years of hindsight (and being able to read the wrap-up post with all the responses) gives me an advantage in this retrospective, I admit, but I didn’t find the thing I was going to write about anyway even though one or two people had a similar idea. And that, dear reader, means that I can write about one of my favourite performance secret weapons: the indexed view. It’s essentially a regular view with an index (or indexes) attached to it. Oracle calls them materialized views. Unlike a regular view which is simply a query definition, the indexed view persists the results, making it a lot more efficient to query that data:

Read on for more information.

Comments closed

Avoid Deprecated Data Types

Aaron Bertrand has some advice for us:

I’ve recently discussed a few features that Microsoft advises against using, and that I think you should forget exist, too. There was the case where a colleague constantly promoted the deprecated backward compatibility view sys.sysprocesses instead of newer dynamic management views (DMVs), and another case where a different colleague took down a production server using SQL Server Profiler.

My latest run-in with things best forgotten is a new stored procedure with an ntext parameter. I checked and, sure enough, the data type matches the schema for the underlying table. My mind started racing about these older data types to explain why we really shouldn’t be using them anymore:

I can’t remember the last time I saw new SQL Server tables created with ntext or other deprecated types, but apparently it happens.

Comments closed

Just One Well-Placed Index

Eric Cobb has a success story:

This image is an actual screen shot of one of our production SQL Server’s CPU usage, taken from our SQL Sentry monitoring system. Obviously this server was under some strain. Users were complaining that queries were taking 30+ seconds to run when they normally returned data in milliseconds. It eventually reached a point to where applications were timing out because queries were taking so long. After doing some analysis in SQL Sentry, we were able to determine what was causing the CPU spike, and came up with 3 nonclustered indexes to add to help alleviate the pressure. The screen shot you see here is what happened after I added the first index.

Click through to see the image as well as the major difference in CPU utilization from a single change.

Comments closed

The Power BI Premium vs Azure Analysis Services Gap is Closing

Marco Russo has an update:

Almost 18 months ago I compared Azure Analysis Services and Power BI Premium for large datasets. At that time, Azure Analysis Services was a clear choice, but it is almost time to update that post with a longer article. Because of time constraints, I just want to quickly review what changed so far, promising a longer and more detailed update in a few months.

Read on to see Marco’s synopsis of what has happened since then. For my money, Power BI Premium Per User is already at a place where I’d prefer it to Azure Analysis Services.

Comments closed

When Bar Charts Don’t Start at Zero

Alex Velez has a confession:

Spoiler alert: I made a bar chart that does not have a zero baseline. I should add that this was intentional and not for teaching purposes, but rather because it seemed like the more appropriate solution for my given scenario.

This is an interesting edge case, but honestly, I think a bar chart is the wrong choice for the job here. I definitely prefer a dot plot here, even if the one Alex put together was a bit noisy. I think the best answer might have been to have a vertically aligned dot plot, similar to the final bar chart except without the bars. That reduces a lot of the noise while letting you label the specific points.

As far as the topic, I defer to noted philosopher Ron Swanson: “There’s only one thing I hate more than lying: skim milk. Which is water that’s lying about being milk.”

Comments closed

SQL Server: Side-By-Side Install or Direct Upgrade?

Kenneth Fisher lays out preferences between two upgrade paths:

Most discussions like this start with the fact that an in-place upgrade is far easier but riskier if anything goes wrong. Side-by-side is more work and you run the risk of forgetting something. But if something goes wrong you just move back to the old instance.

I thought about something that isn’t usually part of the discussion this week while working on a side-by-side migration.

Read on for Kenneth’s insight. My general preference is side-by-side updates on a new server, as that helps get rid of operating system bit rot as well.

Comments closed

A Review of Serverless SQL Pools

Teo Lachev lays out a review of serverless SQL pools in Azure Synapse Analytics:

Being able to query files using SQL is great. Some of you might remember the U-SQL language that was introduced a few years ago alongside Azure Data Lake Storage (ADLS) Gen 1 which is now deprecated. It never caught up because it looked like SQL but it wasn’t (it was actually closer to C#). Now we’re talking about real SQL. To query files! This opens the possibility to implement a logical warehouse (the emphasis is on logical as everyone to my knowledge who tried to replace a data warehouse with a data lake has failed). Or, you can connect Power BI to the serverless endpoint and start querying all these files in DirectQuery mode. So, this enables real-time BI on top of file extracts.

Click through for the pros and cons of using serverless SQL pools today.

Comments closed

Executing Azure Data Factory Pipelines with Power App

Rayis Imayev has a plan:

One of my university professors liked to tell us a quote, “The Sleep of Reason Produces Monsters”, in a way to help us, his students, to stay active in our thinking process. I’m not sure if Francisco Goya, had a similar aspiration when he was creating his artwork with the same name.

So, let me explain my reasons to create a solution to trigger Azure Data Factory (ADF) pipelines from a Power App and why it shouldn’t be considered as a monster 🙂

If that’s not an introduction enticing enough to get you to read the whole thing, I don’t know what is.

Comments closed