Blog Post

Azure SQL Blog
3 MIN READ

ZSTD compression in SQL Server 2025

Dinakar-Nethi's avatar
Dinakar-Nethi
Icon for Microsoft rankMicrosoft
May 19, 2025

Introducing ZSTD Compression in SQL Server 2025: A Leap Forward in Data Efficiency

Introducing ZSTD Compression in SQL Server 2025: A Leap Forward in Data Efficiency

With the release of SQL Server 2025 Preview, we are introducing a powerful new feature that promises to significantly enhance data storage efficiency: support for the Zstandard (ZSTD) compression algorithm. This open-source compression technology, originally developed by Yann Collet at Facebook, is now being integrated into SQL Server as a modern alternative to the long-standing MS_XPRESS compression algorithm.

What is ZSTD?

ZSTD is a fast, lossless compression algorithm that offers a compelling balance  between compression ratio and speed. It has gained widespread adoption across the tech industry due to its:

  • High compression ratios — often outperforming legacy algorithms like MS_XPRESS.
  • Fast decompression speeds — ideal for read-heavy workloads.
  • Scalability — tunable compression levels to balance CPU usage and storage savings.

Compression in SQL Server: Then and Now

SQL Server has long supported data compression to reduce storage costs and improve I/O performance. The MS_XPRESS algorithm, used in row and page compression, has served well for many years. However, as data volumes grow and performance demands increase, a more efficient solution is needed.

Enter ZSTD.

Key Benefits of ZSTD in SQL Server 2025

  1. Improved Compression Ratios
    In internal benchmarks, ZSTD has shown up to 30–50% better compression compared to MS_XPRESS, depending on the data type and structure. This translates to significant storage savings, especially for large data warehouses and archival systems.
  2. Faster Decompression
    ZSTD’s optimized decompression path ensures that queries on compressed data remain fast, even as compression ratios improve.
  3. Flexible Compression Levels
    SQL Server 2025 allows administrators to choose from multiple ZSTD compression levels, enabling fine-tuned control over the trade-off between CPU usage and compression efficiency.
  4. Seamless Integration
    ZSTD is integrated into the existing compression framework, meaning you can apply it using familiar T-SQL syntax and management tools.

How to Use ZSTD in SQL Server 2025

Using ZSTD is as simple as specifying it in your compression options.

Examples:

Default compression of MS_XPRESS:
Specify ZSTD during BACKUP:
BACKUP DATABASE <database_name> TO {DISK|TAPE|URL} WITH COMPRESSION (ALGORITHM = ZSTD) 
Specify ZSTD and compression level:
BACKUP DATABASE <database_name> TO {DISK|TAPE|URL} WITH COMPRESSION (ALGORITHM = ZSTD, LEVEL=HIGH) 

The default compression level is LOW. Allowed values are LOW, MEDIUM and HIGH.

 

As you would expect, specifying HIGH compression level takes longer compared to LOW compression level.

How to verify which compression algorithm was used:

You can use the RESTORE HEADERONLY command to verify which compression algorithm was used during the backup.

 

The CompressionAlgorithm column will display the name of the algorithm.

Comparing compression levels:

A quick look at the file sizes shows the ZSTD does show some savings. Additionally, a higher level of compression is achieved when LEVEL=HIGH is specified.

Final Thoughts

While the actual savings from the new compression algorithm varies based on the nature of data and amount of resources available, in general we have seen significant improvements in compression.

The integration of ZSTD into SQL Server 2025 marks a significant step forward in data compression technology. Whether you're managing terabytes of transactional data or optimizing your data lake for analytics, ZSTD offers a modern, efficient, and high-performance solution.

Looking forward to hearing your feedback.

 

SQL Server 2025 brings a ton of new features and capabilities. Refer to Whats new in SQL 2025 for all the excitement. 

 

Cheers

Dinakar

Published May 19, 2025
Version 1.0