Press "Enter" to skip to content

Curated SQL Posts

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.

Comments closed

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.

Comments closed

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.

Comments closed

psql Meta-Commands

Ian Parker shows off some meta-commands:

If you manage PostgreSQL from a terminal you already know psql, the interactive client that ships with every installation. Most developers use it for the basics—running SELECT statements, loading a .sql file, maybe poking around with \dt to see which tables exist.

Beneath that familiar surface, though, psql hides a rich toolbox of meta-commands. These commands, all prefixed with a backslash, live inside the client. They’re not SQL, they’re shortcuts built into psql itself, and they can make everyday tasks faster and far less error-prone.

Read on for six of these, including examples like \watch to view something with periodic refresh.

Comments closed

HA/DR in Oracle with Data Guard

Kellyn Gorman takes a peek at Oracle Data Guard:

In its traditional, (and free) configuration, Oracle Data Guard operates in an active/passive architecture.  This incredibly well-designed and valuable solution from Oracle which comes included with the Enterprise Edition has as part of its architecture:

  • primary database, which is an active, accessible database system.
  • One or more standby databases, which are passive replicas that continuously receive redo data from the primary.

Click through for an overview of the product.

Comments closed

The Challenges with Sharing Power BI Reports with External Users

Soheil Bakhshi begins a new series:

Are you a Power BI developer or someone in a BI or finance team who needs to share reports with customers, partners, or vendors? If they are not part of your Microsoft 365 tenant, things get a bit more complex than just clicking the “Share” button.

This is a common need, especially in consulting scenarios, but doing it securely and correctly takes more than people often think. It involves both technical setup and a clear understanding of roles and terminology.

This post lays out the groundwork for the rest of the series, so stay tuned for more.

Comments closed

The Case against Database Mocks

Brandur Leach lays out the argument:

The textbook example of this is the database mock. Here’s a rough articulation of the bull case for this idea: CPUs are fast. Memory is fast. Disks are slow. Why should tests have to store data to a full relational database with all its associated bookkeeping when that could be swapped out for an ultra-fast, in-memory key/value store? Think of all the time that could be saved by skipping that pesky fsync, not having to update that plethora of indexes, and foregoing all that expensive WAL accounting. Database operations measured in hundreds of microseconds or even *gasp*, milliseconds, could plausibly be knocked down to 10s of microseconds instead.

Prior to reading the article, my stance was as follows: use database mocks for unit test libraries, in which you aren’t testing the actual data processing or retrieval. Those should be able to run on an isolated build server with no access to a database. But you also need proper integration tests that cover how you interact with the database, and those tests should be a majority of your test suite. You should have a known state database before each test run (which is where Docker containers or database snapshots become extremely helpful), and passing the database tests should be a gate early on in the CI/CD process.

After reading the article, my priors remain the same. I think there’s still scope for database mocks, but not as a replacement for proper integration testing with the database.

Comments closed

Automated Table Statistics on Delta Tables in Microsoft Fabric

Santhosh Kumar Ravindran makes an announcement:

We’re thrilled to introduce Automated Table Statistics in Microsoft Fabric Data Engineering — a major upgrade that helps you get blazing-fast query performance with zero manual effort.

Whether you’re running complex joins, large aggregations, or heavy filtering workloads, Fabric’s new automated statistics will help Spark make smarter decisions, saving you time, compute, and money.

Click through to see what’s included, as well as the limitations associated with this. You can still create manual statistics if you’d like, so on the whole, I approve.

Comments closed