XML Compression in SQL Server 2022

We’re back to some good old fashioned SQL Server today. I recently checked out the Data Exposed episode SQL Server 2022 Storage Engine Capabilities (Ep. 4) and one section especially caught my attention: XML compression.

The whole video is worth the watch. Other topics include tempdb performance, Shrink DB changes, and more. Overall, some good info around SQL Server 2022.

My Curiosity

SQL Server 2022 will have some tempdb performance updates which is always nice. Specifically, concurrent GAM and SGAM updates.

There are also improvements when shrinking databases. When shrinking databases or files with WAIT_AT_LOW_PRIORITY, new queries requiring locks will not be blocked and will continue to execute.

Yes, this is an improvement, but there’s a part of me that hates the idea of someone perceiving this as “great, now I can shrink everything all the time!” I see you scheduling that nightly shrink job. Not so fast.

My Attention

The discussion on XML Compression begins at the 9:22 mark.

I deal with XML almost daily in SQL Server. There’s always new XML data coming in and the majority of that data will need be kept for years. Most will never be referenced again or ever needed. Being able to compress some of this data would really help managing disk space.

What about helping with I/O performance? With the XML data compressed, that means there’s less data to pull into the buffer pool. We’ll still have the CPU overhead to watch out for. I guess we’ll have to weigh those factors to determine if the compression is worth it. While it’s admittedly something to measure in your own environment, it’s something I look forward to testing for myself to see how it plays out.

Fun Times Ahead

Once again, this blog just touches on some highlights from Data Exposed. Be sure to check out that video for more details. SQL Server 2022 will be here before you know it.

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s