Latest SQLComics

SQL Corgs Explain Inner Joins

on April 15, 2024

Joins are essential. The SQL Corgs introduce you to INNER joins in this animated short.

LOOK HERE

Awkward Unicorn Explains Database Normalization

on April 3, 2024

Why do we “normalize” relational databases, and what are the basics? Awkward Unicorn explains, with a little help from their friends.

LOOK HERE

SQL Basics (SELECT, FROM, WHERE) with Freyja the Corgi

on April 1, 2024

Freyja the corgi shares her tips for learning SQL: SELECT, FROM, and WHERE.

Now that I’m getting the hang of this, I think I’m going to do a whole series of shorts on SQL syntax essentials, plus tips and tricks!

LOOK HERE

Rita the Raccoon Writes SQL

on March 28, 2024

I learned to make short form videos with my drawings this week, and, well… things are about to get weirder.

LOOK HERE

Latest blog posts

Automatic Plan Correction Could be a Great Auto Tuning Feature for SQL Server. Here's why it Isn't.

By Kendra Little on January 17, 2024

I’ve written a bit about SQL Server’s Automatic Plan Correction feature before– I have an hour long free course with demos on Automatic Plan Correction here on the site.

Today I’m updating that course with a note: after using Automatic Plan Correction in anger for a good amount of time, I do not recommend enabling the feature. I’ve had it cause too many performance problems, and there are not a ton of options for an administrator when it’s causing those problems.

Meanwhile, becoming reliant on the feature for the places where it does help makes it difficult to disable the feature. You end up stuck with a very weird set of problems that are oddly similar to the problems the feature was designed to solve.

Further investment in the feature could solve these problems and make this a great tool for customers. Here’s a run down of what Automatic Plan Correction needs from a user who has suffered from it.

Continue reading

Power BI Performance Tuning with Eugene Meidinger

By Kendra Little on January 16, 2024

Eugene Meidinger stops by the Dear SQL DBA Podcast to chat about Power BI Performance Tuning.

We talk about the various engines and languages used in Power BI and big-picture strategies for getting performance from the start. Eugene then talks about the community of tools and techniques that can be used to dig in and solve performance problems in Power BI.

Continue reading

Microsoft is Breaking Database Compatibility Levels for SQL Server

By Kendra Little on December 18, 2023

According to Microsoft’s documentation, “Database compatibility level … allow[s] the SQL Server Database Engine to be upgraded while keeping the same functional status for connecting applications by maintaining the same pre-upgrade database compatibility level.”

But these days, the “functional status” of a database at a given compatibility level differs depending on whether you’re using SQL Server, Azure SQL Managed Instance, or Azure SQL Database – and in the hosted versions it may change anytime without notice. Surprise, your database behaves differently now!

The whole concept is breaking down, and this is bad news for users of both managed services and the boxed product.

Continue reading

Getting around Error 40510 to configure Resource Governor in Azure SQL Managed Instance

By Kendra Little on December 15, 2023

One feature I’ve not appreciated enough in the past in SQL Server is Resource Governor.

Resource Governor allows you to fix problems with Memory Grants in a simple way, as Erik Darling recommends. It also lets you classify sessions into groups and limit the maximum number of simultaneous requests, and /or limit the degree of parallelism if you need more CPU for other workloads. While this will slow down the queries you classify into that group, this can be super useful, especially if you’re already using something like Snapshot isolation to prevent blocking or you are using a read-only replica.

In Azure SQL Managed Instance, you get to use Resource Governor, even in the General Purpose tier. This is awesome.

Just make sure you execute commands in the context of the master database, or you’ll get error 40510: Statement 'ALTER RESOURCE GOVERNOR' is not supported in this version of SQL Server.

It is supported! Just USE master; before running your commands.

Continue reading