Press "Enter" to skip to content

Author: Kevin Feasel

Reading an EXPLAIN Plan in PostgreSQL

Andrea Gnemmi reads the plan:

A typical task DBAs and Developers perform is optimizing query performance. The first step, after identifying troublesome queries using a tool like the pg_stat_statements view, is to look at the execution plan to determine what is happening and how to improve.

In PostgreSQL this can be done using EXPLAIN or using third-party tools which use the same process to gather query execution data.

Click through to see what an explain plan looks like in PostgreSQL and ways to visualize those plans.

Leave a Comment

Regression Testing for PostgreSQL Queries

Radim Marek announces a new project:

This is where RegreSQL comes in. Rather than trying to turn SQL into something else, RegreSQL embraces “SQL as strings” reality and applies the same testing methodology PostgreSQL itself uses: regression testing. You write (or generate – continue reading) your SQL queries, provide input data, and RegreSQL verifies that future changes don’t break those expectations.

The features don’t stop there though – it tracks performance baselines, detects common query plan regressions (like sequential scans), and gives you framework for systematic experimentation with the schema changes and query change management.

Read on to learn more about how it works and check out the GitHub repo if you’re interested.

Leave a Comment

The Joys of FORMATMESSAGE

Louis Davidson listened to some advice:

A few weeks ago, I wrote a post on using temporary stored procedures in SQL Server. Kevin Feasel of Curated SQL had this reply Using Temporary Stored Procedures to Output Common Messages. I had heard of FORMATMESSAGE before, but I had completely coupled this in my mind with formatting SQL Server error messages. (Which turns out to be a great use of this tech)

Click through to see how it works and some additional testing with RAISERROR().

Leave a Comment

View Creation via Visual Queries in Microsoft Fabric

Jon Vöge creates a view:

As companies adopt Microsoft Fabric, the distance between backend artifact and Semantic Model is smaller than ever, and it feels more obvious than ever to push some of those local transformations to your Fabric Storage item of choice.

The question is. How do you do that? There are many options:

Read on for those options. Jon focuses on one for people with less database experience.

Leave a Comment

Stream or Batch Ordering with Apache Iceberg

Jack Vanlightly shows some tradeoffs:

Today I want to talk about stream analytics, batch analytics and Apache Iceberg. Stream and batch analytics work differently but both can be built on top of Iceberg, but due to their differences there can be a tug-of-war over the Iceberg table itself. In this post I am going to use two real-world systems, Apache Fluss (streaming tabular storage) and Confluent Tableflow (Kafka-to-Iceberg), as a case study for these tensions between stream and batch analytics.

Read on for a summary of how two opposite ideas can both be perfectly reasonable.

Leave a Comment

Cutting Costs of Azure Self-Hosted Integration Runtimes

Andy Brownsword saves some quid:

If you have a Self-Hosted Integration Runtime (SHIR, or IR for short here) on an Azure Virtual Machine (VM), there’s a cost to keep it online. When used intermittently – for example during batch processes – this is inefficient for costs as you’re paying for the compute you don’t need. One way to alleviate this is by controlling uptime of the environment manually, only bringing it online for as long as needed.

Read on to see how to do this.

Leave a Comment

Querying JSON Quickly in SQL Server 2025

Brent Ozar follows up on yesterday’s post:

SQL Server 2025 and .NET 10 bring several new improvements to storing JSON natively in the database and querying it quickly.

On the SQL Server 2025 side, the two big ones are the new native JSON indexes and the new JSON_CONTAINS function. Let’s see their improvements in action. On the .NET 10 side, EF 10 not only supports the new JSON data type, but on databases of compatibility level 170 or higher, EF will automatically migrate JSON data from NVARCHAR(MAX) data types over to JSON the next time you do a migration, as explained in the What’s New in EF Core 10 doc. That makes it especially important for you to understand how the new JSON indexes work, because they may be coming at you quickly the instant you change your compatibility level.

Read on to see Brent’s take.

Leave a Comment

SSMS 22 now Generally Available

John Deardurff shares the news:

Microsoft has announced that SQL Server Management Studio (SSMS) 22 is now generally available! This latest release brings powerful new capabilities to enhance your SQL Server experience:

Click through to see what’s new and see the original Microsoft blog post on the topic. One thing to note is that the query hint recommendation tool is still in preview, so you do need to select it as an individual component to install.

Leave a Comment

Running SQL Server in a Local Container via VSCode

Eduardo Pivaral uses the MSSQL extension in Visual Studio Code:

You are a developer using SQL Server for your applications, and you need to quickly setup a local development environment. How can you make sure the environment is OS agnostic, so it can run on any operating system? Let’s see how we can quickly create a local container to run SQL Server using the VSCode MSSQL Extension.

Read on for the instructions. I still do the old-fashioned thing of opening up a terminal window and running docker commands, but this is pretty convenient.

Leave a Comment