Press "Enter" to skip to content

Day: November 25, 2026

The QUALIFY Operator in Spark SQL

Koen Verbeeck looks at a bit of non-standard syntax:

Once upon a time I had a series about some cool stuff in Snowflake: features in their SQL dialect that were not available in the T-SQL dialect at the time (and some still aren’t). I followed up with some posts about interesting Fabric features (some of them are more “ironic” in nature as they describe extremely basic features who were originally missing in Fabric, like folders).

Recently I started working with Databricks on a project, and I mainly have to use the serverless SQL endpoint. Like Snowflake, Databricks also has a pretty amazing SQL dialect. In this blog post, I’m going to talk about one of my favorite new additions to the world of window functions: QUALIFY.

QUALIFY has been around since the Teradata days and it filters window functions in your SELECT statement. That makes it pretty useful, as it means you don’t need common table expressions or sub-queries to filter the results of a SQL query using a window function, like getting records where the RANK() is in the top 3.

Leave a Comment

Working with Latch Contention in SQL Server

M A A Mehedi Hasan gets into latches:

As a DBA, you are often vigilant to the common suspects like blocking, deadlocks, or long-running queries. Sometimes, performance issues creep in silently due to latch contention. When it overwhelms, even the most optimized queries may crawl. This article explores what SQL Server latch contention is, how latches differ from locks and how to detect latch issues. Then we will simulate a latch contention scenario and check best practices to minimize its impact on your SQL Server database.

Read on for notes around what latches are and how they differ from locks, why you might get latch contention, and a few ways you might be able to resolve contention issues if you have them. I will say that, in my own experience, latch contention typically wasn’t that big of a deal, in the sense that people make databases slow in other ways long before latch contention becomes the primary issue.

Leave a Comment

Digging into Microsoft Fabric Semantic Views

Eugene Meidinger and Ruben Van de Voorde lay out the purpose of semantic views:

Semantic views are a new type of object you can create in a Fabric lakehouse, where you specify business meaning in YAML. This YAML can identify the tables and relationships as well as contain the DAX for defining metrics. Semantic views are one way Microsoft is implementing the Apache Ossie format, which allows for greater portability for semantic modeling. This represents a shift in how Microsoft has traditionally handled semantic models, which is as self-contained units.

Read on to see what they are, how they work and what it means for Fabric developers.

Leave a Comment

Fuzzy Matching in SQL Server

Warwick Rudd looks at a few functions:

Every organisation I work with has the same customer in its database three times: “Jon Smith”, “John Smith” and “John Smiht”. Regex can tell you whether a value is well formed. It can’t tell you that two values are probably the same thing. That’s the job of fuzzy string matching, and SQL Server 2025 now has it built in.

I will say that I needed to turn on “preview features” for SQL Server 2025 CU11 in a container, though they did announce recently that these functions are GA. It might be a difference in the container versus other installations, or maybe it’ll be totally GA in CU12.

Warwick digs in a bit into the calculations and also points out that this is going to be fairly expensive because of the nature of the comparison. You likely won’t notice on a few thousand rows, but if you have millions of rows, performance will not be great at all.

Leave a Comment