Press "Enter" to skip to content

Author: Kevin Feasel

SQL Server Performance Office Hours

Erik Darling is back with a new episode of office hours:

Do you know of any disadvantages of using a filtered index to filter NULL values? We have a very heavy transactional table, like 10k trans/sec, with a clustered index and one non-clustered index. We don’t have any queries that select rows with NULL values ​​from this table. The DBA team said we should avoid using a filtered index without any proof. What do you think?

Click through for Erik’s answers in video form. I was workshopping a joke around how all of the evidence Erik has of me being mean to him are lies, but couldn’t make it work without riding the line of “Wait…is he serious?”

Leave a Comment

Controlling Selections in Calculation Groups

Marco Russo and Alberto Ferrari looks at calculation groups:

Calculation groups are often used to display options in a report to change the calculation of existing measures by selecting items on a slicer. However, only a single calculation item can be executed for a measure reference, which could make the semantic model harder to use when the user selects two or more items in a calculation group.

Two new calculation group properties, multipleOrEmptySelectionExpression and noSelectionExpression, provide a way to control the calculation in these conditions that, so far, ignored the presence of the calculation group, thus executing the measures without applying any transformation. This article shows how to use these features and provides guidance on using the feature in preview: despite not having a user interface to manage these new properties, the TMDL view in Power BI Desktop and external tools like Tabular Editor already allow you to create and publish a semantic model that uses these new properties.

Read on to see how these properties work.

Leave a Comment

Session Variables in PostgreSQL

Kaarel Moppel talks session variables:

Animated by some comments / complaints about Postgres’ missing user variables story on a Reddit post about PostgreSQL pain points in the real world – I thought I’d elaborate a bit on sessions vars – which is indeed a little known Postgres functionality.

Although this “alley” has existed for ages – and one can also use injected session variables to implement crazy stuff like token based Row Level Security or store huge and complex JSON state, or just keep a bit of DB-side state over essentially stateless statement-level connection pools – should you actually use it? What are the alternatives instead? Read on …

Click through to learn more.

Leave a Comment

Date and Time Data Types in MySQL and PostgreSQL

Aisha Bukar compares and contrasts:

MySQL and PostgreSQL offer several data types that can be used for handling dates and times. These data types provide the tools to store and manage information like dates of a particular event, timestamps, and even time durations. While they both share some similarities on how they handle date and time, there are key differences in how they handle precision, time zones, and date/time calculations.

Getting date and time data right is key for keeping databases accurate and useful. In this article, we will compare how MySQL and PostgreSQL handle date and time data, their differences, strengths, and which one might work better for your needs. By the end, you’ll have a clearer idea of which database to choose for managing date and time information.

Click through to learn about the two platforms.

Leave a Comment

Working with Memory-Optimized tempdb

Haripriya Naidu deals with metadata contention:

This feature is specifically designed to reduce metadata contention. Note that adding data files will not resolve metadata contention, as that addresses a different type of contention.

You can learn more about enabling this feature and its benefits here.

A company I used to work for was a perfect candidate for this, except that the limitations meant that we couldn’t actually use it. We ended up switching some of our most frequently recurring temp tables and table-valued parameters to memory-optimized user-defined table types and got us out of our metadata contention mess without using this feature.

Leave a Comment

Sharing Power BI Reports across Tenants

Soheil Bakhshi does a bit of sharing:

In this post, we’ll focus on a practical scenario. One organisation, let’s call it Tenant A, wants to share a Power BI report with someone from another organisation, Tenant B. We’ll cover everything from verifying licenses to configuring the Fabric Admin Portal and inviting the external user. If you’re looking to follow along, this guide will give you a clear path to replicate the same setup in your environment.

Click through for the process.

Leave a Comment

Performance Testing ZSTD Backup Compression

Anthony Nocentino gives SQL Server’s new backup compression format a try:

SQL Server 2025 introduces a new compression algorithm, ZSTD (Zstandard), which can help with database backup performance. The implementation of ZSTD gives you more control over your backup performance in terms of CPU consumption and backup runtime. I recently ran some rough benchmarks comparing ZSTD, and its three compression levels, with the existing MS_XPRESS algorithm, and the results are compelling and give you some additional tools for managing performance for database backups.

Click through for Anthony’s test and findings.

Leave a Comment

Split-Brain Scenarios in PostgreSQL Clusters

Semab Tariq knows that an application cannot serve two masters:

In this blog post, we will try to explore a critical failure condition known as a split-brain scenario that can occur in PostgreSQL HA clusters. We will first see what split-brain means, and then how it can impact PostgreSQL clusters, and finally discuss how to prevent it through architectural choices and tools available in the PostgreSQL ecosystem

Click through for an explanation of split-brain and what can cause this problem. Additionally, Semab includes several tips on how to limit the likelihood of a split-brain scenario occurring.

Leave a Comment

Creating a SQL Server 2025 Container

Vlad Drumea tries out SQL Server 2025:

This post covers creating SQL Server 2025 containers in Podman, Qnap Container Station, and sqlcmd, and restoring a sample database to test the new version.

One important thing to remember is that all SQL Server 2025 containers are based on the Linux build of SQL Server. For 90% of tasks (give or take), that won’t matter, and you’ll still have a good time trying out the new version of SQL Server and make sure things still work in your databases the way you expect them to. But some functionality (e.g., merge replication) is not available in Linux and other functionality (like PolyBase or Machine Learning Services) has a very different installation process.

Leave a Comment