Press "Enter" to skip to content

Day: April 14, 2026

Dealing with Bad Parameter Sniffing

Hugo Kornelis has a new video:

The video starts with an explanation of two good features: parameter sniffing and plan caching. But those features can interact in an unwanted way, resulting in erratic bad performance. Now we have what I call “bad parameter sniffing”.

Starting at approximately 8:30, I then describe the three most common root causes for bad parameter sniffing: equality filters on a column with a skewed data distribution; inequality filters with varying selectivity; and optional parameters.

Click through for the rest of the synopsis, as well as the video itself.

Leave a Comment

Cross-Database Ownership Chaining and Why to Avoid It

Fabiano Amorim provides a public service announcement:

A dangerous privilege-escalation path exists in SQL Server when cross-database ownership chaining, system database defaults, and overly permissive permissions are combined. Under these conditions, a low-privilege authenticated user can escalate to sysadmin, gaining full control of the instance. This article walks through how an attacker can abuse these mechanics.

Click through for a detailed explanation of the problem. Then, check out module signing as an alternative that is considerably more secure.

Leave a Comment

Implementing SOFTMAX in SQL Server

Sebastiao Pereira is back with another formula:

The SOFTMAX function takes raw scores and converts into a probability distribution. This mathematical function is used in neural networking training, multiclass classification methods, multinomial logistic regression, multiclass linear discriminant analysis, and naïve Bayes classifiers. How can this function be built in SQL Server?

Click through for the implementation.

Leave a Comment

OneLake File Explorer now GA

Harmeet Gill announces general availability of OneLake File Explorer:

Imagine this scenario: You’re a data engineer working with files on your local machine—CSV extracts, Excel files from the business, or intermediate outputs generated on your PC. Your goal is to run a Fabric pipeline, explore the data in a notebook, or train a model in Microsoft Fabric.

Traditionally, that means uploading files through a browser, writing scripts to push data into the lake, or coordinating with someone else who has access. It works—but it adds friction.

OneLake File Explorer removes that friction by bringing OneLake directly into Windows File Explorer.

It’s taken about 3 years to get to this point, but I’m glad to see it get past the preview hurdle.

Leave a Comment

Presenting for Impact

Rob Farley tells a story:

I like this topic from the legendary Steve Hughes. It’s been a long time since I’ve seen him, but he was always a thoroughly good guy. We both spoke at conferences back in the heyday of the SQL community, and although his journey has been tougher than most in recent years, he is still impacting the world in amazing ways.

Steve is hosting this month’s T-SQL Tuesday, and asks about what we’ve learned from conference sessions, things which impacted us and how we work. It’s an interesting topic for two reasons – firstly, I enjoy giving conference presentations, and secondly, they’re really not my preferred way of learning.

Rob goes on to talk about conference sessions that caught his interest. One book that helped me considerably in my ability to present is Peter Cohan’s Great Demo! This is, admittedly, for sales presentations rather than technical presentations. However, I think it’s pretty straightforward to map most of the concepts to technical demos, and the advice in the book is great for getting your point across early and letting people make sure they are in the right room at the right time straight from the get-go.

Leave a Comment

Increasing CPU Capacity or Tuning Queries

John Deardurff explains how to make a choice:

Recently while discussing the Task Execution Model and Thread Scheduling, I was asked the following question, When discussing worker threads, how can we determine whether we should increase CPU capacity or focus on query tuning? This is when our worker threads are under pressure and the instance is becoming exhausted?

In my brain, I thought, that is a great question, and it’s exactly the right way to think about worker thread pressure vs. real CPU starvation, especially when worker threads are getting tight. Let’s write a post.

John has a nice discussion of the trade-offs and signals associated with each approach. One third approach I might add is caching in the application(s), if applicable. This is especially useful if a significant fraction of the queries access static or nearly-static data.

Leave a Comment