Zstandard Backup Compression in SQL Server

Zstandard Backup Compression in SQL Server 2025 

In SQL Server 2025, Microsoft has introduced a highly anticipated enhancement - support for the Zstandard (ZSTD) compression algorithm in native database backups. This marks a major leap forward in backup efficiency, delivering faster processing speeds and smaller file sizes without significantly increasing CPU usage.

Whether you're managing on-premises SQL Servers or hybrid cloud environments, understanding and implementing Zstandard compression can help you optimize both performance and storage costs.

What is Zstandard?

Zstandard (ZSTD) is a modern, open-source lossless data compression algorithm developed by Facebook. It’s designed to offer:

  • High compression ratios (comparable to zlib/gzip)

  • Lightning-fast compression and decompression

  • Low memory and CPU usage

Unlike legacy algorithms like MS_XPRESS, Zstandard excels at balancing speed and size—making it ideal for high-throughput, enterprise-grade workloads.

Why SQL Server 2025 Supports Zstandard

SQL Server has supported backup compression since 2008 (starting with the legacy algorithm). However, as databases have grown in size and complexity, backup and restore windows have become critical bottlenecks.

SQL Server 2025 introduces:

COMPRESSION_ALGORITHM = ZSTD

This new option offers:

  • Up to 40–70% smaller backup sizes

  • Faster backup and restore operations

  • Enhanced performance with lower CPU usage

Using Zstandard in T-SQL -
You can now explicitly select Zstandard during backup:

BACKUP DATABASE AdventureWorks2025
TO DISK = 'E:\Backups\AW2025_ZSTD.bak'
WITH COMPRESSION,
     COMPRESSION_ALGORITHM = ZSTD;

You can also use this with BACKUP LOG or differential backups.

                                                                Performance Comparison

Below is a benchmark from a real-world 150 GB OLTP database:

Observations:

  • ZSTD offers the best combination of speed and size.

  • CPU usage is well-optimized even during decompression.

  • Ideal for systems with large backups and tight RPO/RTO windows.

How to Set Zstandard as Default
SQL Server 2025 allows you to configure ZSTD as the default backup algorithm:

EXEC sp_configure 'backup compression default algorithm', 3;
RECONFIGURE;

* 0 = None
* 1 = Legacy (MS_XPRESS)
* 3 = Zstandard

How to Verify the Algorithm Used -
You can use RESTORE HEADERONLY to check the compression method:

RESTORE HEADERONLY  
FROM DISK = 'E:\Backups\AW2025_ZSTD.bak';

Check the BackupCompressionAlgorithm field:

* 0 = None
* 1 = MS_XPRESS
* 3 = ZSTD

Restore Compatibility -

Zstandard backups cannot be restored on versions earlier than SQL Server 2025.

If you're managing mixed environments, ensure you maintain backward-compatible copies using the LEGACY compression algorithm.



Comments

Popular posts from this blog

How data is replicated from the Primary Replica to the Secondary Replica in a SQL Server Always On Availability Group

Accelerated Database Recovery (ADR) in SQL Server

COPILOT Feature in SQL Server 2025