Press "Enter" to skip to content

Curated SQL Posts

Share Groups and Sub-Optimal Performance

Jack Vanlightly creates a problem:

In this post we’re going to see how share.acquire.mode=record_limit combined with:

  • fewer consumers than partitions
  • and various cases of “partition skew”

…can result in subpar performance with share groups. 

I stumbled on these issues when running large sets of dimensional tests with Dimster’s explore-limits mode, which finds the highest sustainable throughput while staying within a target end-to-end latency target. There was a specific subset of the tests that explore-limits mode would consistently fail to complete, and they all happened to be with record_limit and a consumer count lower than the partition count. In this test, we’ll understand why Dimster had such a hard time with this combination.

Click through for the details, as well as how to mitigate this sort of scenario.

Leave a Comment

Saving Unity Catalog Tables in Microsoft OneLake

Gerhard Brueckl pushes boundaries:

Microsoft and Databricks recently announced the next step of their collaboration and integration. It is now possible to store Databricks Unity Catalog tables directly in Microsoft OneLake. Here are the official announcement from Microsoft: https://community.fabric.microsoft.com/t5/Fabric-Updates-Blog/Extending-interoperability-Azure-Databricks-can-now-store-Unity/ba-p/5199741

Both parties have been working together to make this possible: Microsoft introduced the new item type Azure Databricks Storage and Databricks added support for OneLake for Unity Catalog External Locations (which can then be used to store the actual data). The UC External Location would then simply point to the storage endpoint provided by the Azure Databricks Storage item in Microsoft Fabric.

Click through to see what Gerhard found, as well as the results of some experimentation.

Leave a Comment

A Use for Secondary XML Indexes

Hugo Kornelis follows up from an earlier post:

Welcome back to my plansplaining blog series, where I dive deep into the details of non-obvious execution plans. This part is also a sort of follow up on my post from two weeks ago, when I wrote about the structure and usage of XML indexes, and had to admit that I had not been able to come up with good use cases for all types of secondary XML index.

That very same day, I received an email from Mikael (Micke) Eriksson, who pointed me to this question and answer on Stack Exchange for Database Administrators. I then modified that example a bit, to come up with an execution plan that I consider interesting enough that I want to describe it here.

Click through for the example and a dive into what the plan does.

Leave a Comment

Fabric Warehouse CU Metering and Workloads

Nikola Ilic digs into the numbers:

If you are using Microsoft Fabric, you’ve probably received the same email notification as me:)

I’m talking about the one about Fabric Data Warehouse and SQL analytics endpoint metering.

Starting in August 2026, Warehouse CU consumption is moving away from the current per-query CPU-time model and toward a per-workspace, virtual-node time model.

Read on to see what will change and how that should affect the way you think about this infrastructure.

Leave a Comment

The Basics of Query Folding with Power BI

Andy Brownsword explains one performance improvement technique for Power BI data transformations:

As a database developer, when I started using Power BI, I was concerned about it retrieving reams of data only to perform transformations downstream. The Power Query editor misleads us into thinking the retrieval and transformations are applied sequentially.

Thanks to Query Folding, that’s not usually the case. And that gives us more power to extract performance from the database.

This only works in situations where there’s something downstream to perform that processing, like a relational database. And one of the areas where you can affect performance, either positively or negatively, is in organizing operations such that you have a stretch of foldable operations. That way, all of it can run as one operation in the database.

Leave a Comment

sp_Check Tool Updates for June 2026

Jeff Iannucci has a list of updates:

Anyhow, we have a few months’ worth of updates for our FREE sp_Check stored procedures, so here are the June updates. And not only do we have more updates and checks for you, our repos now feature enhanced README files that have even more helpful information as well as a listing of every check in each stored procedure. Yes, really!

We hope these new updates can help make your job even easier, especially at proactively identifying issues. Here are the updates for June 2026, with links to the GitHub repositories where you can download the latest versions.

Click through for the changelog and links to where you can grab the procedures.

Leave a Comment

Reviewing the Power BI Date Picker

Teo Lachev takes a look at a new preview:

The June release of Power BI Desktop includes a preview of a new Power BI slicer configuration – Date Picker. It’s meant to solve two issues with report design.

Read on to see what those two issues are and how this new date picker can resolve them. It’s still in preview, so you’d have to change the settings in Power BI Desktop. And I imagine it won’t be available in Power BI Report Server because those people (including me) can’t be trusted to have nice things.

Leave a Comment

Using REMOVEFILTERS in DAX UDFs

Marco Russo and Alberto Ferrari make use of REMOVEFILTERS:

A DAX user-defined function, also known as a UDF, is expected to return a scalar or a table. However, because functions are fundamentally macro-expansion of DAX code, it is possible to return CALCULATE modifiers if the function is to be called only as a filter argument of CALCULATE.

To show a practical example of when the feature proves to be useful, we debug a measure that fails because some calendar filters are not being removed correctly. Fixing the measure elegantly requires creating a function that removes filters rather than returning a value.

Click through for that example.

Leave a Comment