Press "Enter" to skip to content

Month: June 2026

Optional Parameters in DAX UDFs

Marco Russo and Alberto Ferrari give us an option:

When Microsoft announced that DAX User-defined functions (UDFs) are generally available (GA), another new feature was also announced: it is now possible to define optional parameters in a function and assign them default values.

A parameter is optional when the caller can leave it out. In that case, the function still needs a value to work with, so it falls back to a default. DAX provides that default through an expression written directly in the function signature, next to the parameter it belongs to. This is the mechanism we describe in this article.

Read on to see how it works.

Leave a Comment

Vector Calculations in SQL Server

Greg Low continues a series on vector data in SQL Server

:In this article, I’ll explain how to implement vector search in SQL Server using the VECTOR_DISTANCE and VECTOR_SEARCH functions. You’ll learn how vector indexes work, when to use them, and what the key trade-offs are — including the current read-only table limitation. I’ll also cover the latest syntax changes in Azure SQL Database, where that limitation has already been lifted.

Click through to learn more.

Leave a Comment

pg_ducklake 1.0 Now Available

Qiaosheng Liu makes an announcement:

We started pg_ducklake in January, and today we are releasing v1.0, the first production-ready version. Three things define this release:

  1. Full DuckLake workflow. v1.0 brings most of DuckLake’s feature set to PostgreSQL SQL: DML, schema evolution, time travel, partitioning, sorted tables, the variant type, ACID transactions, and automatic maintenance. Every table stays open to any DuckDB client.
  2. Production-grade. pg_ducklake is tuned to live inside an OLTP database: stable under continuous load, disciplined with memory, and offering the fastest ingestion path for DuckLake.
  3. Standalone and compatible. pg_ducklake started as a fork of pg_duckdb. v1.0 no longer forks or depends on it. It is a self-contained extension, built on a reusable kernel we extracted called libpgduckdb, and it stays compatible with pg_duckdb.

Read on to learn more about what’s in this production release.

Leave a Comment

Log Records in SQL Server

Paul Randal explains what a log record is:

The simplest definition of a log record: it describes a single change to a database. A single operation in the database may cause multiple changes, but each change will usually have its own log record to describe it. An example of this is updating a column in a single row—it will do the following:

Read on to see what it will do, what it looks like, and what kinds of log records exist.

Leave a Comment

What “Filtering Early” Really Means

Louis Davidson lays out the facts:

Which brings me to the point. There is a myth that goes around that you need to place filters in your SQL statements as early in the statement as possible. Most of this is due to the wild misunderstanding of how a query is executed (versus how your query is processed, which I covered last week.) The actual issue here is that the concept of filtering early is actually true, but certainly not in the way it has been taught.

SQL is a fourth-generation language and implementations approach it. With fourth-generation languages, the actual query you write is not the thing that runs, and there is an entire process to interpret what you wrote and execute operations that meet the intent of your query in the most efficient manner.

Now, this is where someone chimes in and gives all of the circumstances in which T-SQL (or pick your variant) fails to live up to its fourth-generation heritage, such as particularly complex queries, nested views with multiple joins, you using mechanisms that force a specific plan, etc. This is because real life is messy, as Louis shows in some of the examples.

So what’s the point of the first paragraph, then? Because I never miss an opportunity to talk about language generations.

Leave a Comment

Variable Libraries in Microsoft Fabric

Nikola Ilic digs into a feature:

I hear you, I hear you: Nikola, that’s what deployment rules in Fabric Deployment Pipelines are for, isn’t it? Well, partly. But there’s a Fabric item built specifically to put an end to this whole genre of pain, and it’s the variable library. This article is the long version: what it is, how it’s wired together under the hood, who can actually consume it, when you should reach for it, when you absolutely shouldn’t, how it compares to the other parameterization features in Fabric, and a real telco demo to make it all concrete.

Click through for a deep dive into how it works.

Leave a Comment

Matching Queries to Indexed Views

Erik Darling has a new video:

Erik Darling here with Darling Data, and in today’s video we’re going to continue on the Learn T-SQL voyage that we have started, and I’m going to talk today a little bit about indexed view matching, because SQL Server is, let’s just call it a mature, or an experienced database engine, and is quite capable, at least in Enterprise Edition, Standard Edition, you do not pay the Microsoft Friendship Tax, so you will be taxed performance-wise, but is quite capable of matching base queries to an indexed view where the syntax matches in some way between them. So, usually exactly between them, not in some way, usually pretty close to just about what you would ask for.

Click through for several tips and, as you experience the frustration of consistently trying to make best use of the view’s index, be glad you’re not trying to get filtered views to work.

Leave a Comment

Automating Azure SQL DB Tasks without SQL Agent

Garry Bargsley solves a problem:

Many routine administrative tasks that have traditionally been handled by SQL Agent still need to be performed:

  • Scheduled stored procedures
  • ETL processes
  • Report generation
  • Data cleanup
  • Monitoring and alerting
  • Business process automation

However, Azure SQL Database does not include SQL Agent.

Garry provides several solutions, and I would add to it third-party job scheduling solutions. Granted, that’s usually an extra expense (whether due to fees or supporting a roll-your-own solution), but it’s on the table. And some of them are better than what SQL Agent has to offer, even if I do like the fact that there’s an okay option built-in for DBAs.

Leave a Comment

Moving Fabric Notebooks between Workspaces

Gilbert Quevauvilliers takes advantage of source control:

With the new Lakehouse Auto-Binding capability in Notebook Git integration, Fabric can now intelligently preserve and resolve the binding between your notebooks and their attached Lakehouses as you move them across workspaces. This makes true multi-environment development and CI/CD workflows in Fabric significantly smoother and more reliable.

I am going to show you how to do this in the blog post below.

That is pretty nice, and Gilbert has a demo of the process, showing that it’s not particularly onerous

Leave a Comment