SQL Server Compression Estimation: Optimize Data Storage and Performance
Join Warwick Rudd, a leading SQL Server consultant at WARDY.IT Solutions, as he presents a comprehensive overview of SQL Server compression. This session covers the history of compression, database and backup compression strategies, and tools for estimating compression savings. Learn about enabling data compression for your SQL Server databases, including techniques for estimating row size reduction, cost-benefit analysis, and understanding the constraints of data types unsuitable for compression. Enhance your SQL Server performance and reduce storage costs with effective compression strategies.
SQL Server Compression Estimation: Optimize Data Storage and Performance
E N D
Presentation Transcript
SQL Server Compression Estimation Presented by Warwick Rudd – warwick.rudd@wardyit.com
About Warwick Rudd • SQL Server Consultant WARDY IT Solutions • Email: warwick.rudd@wardyit.com • Microsoft Certified IT Professional – SQL 2008 Admin (MCITP SQL 2008 Admin) • Microsoft Certified Trainer (MCT) • WARDY IT Solutions • Australia’s leading SQL Server specialists • Deloitte Technology Fast 500 Asia Pacific 2010 Winner
Contents • History of Compression • SQL Server Database Compression • SQL Server Backup Compression • Compression Estimation Tool
What is Compression ? The reduction in size of data to save space or processing time.
History of Compression • SQL Server 2005 SP2 • New Data type - VarDecimal • SQL Server 2008 • Database & Backup compression • SQL Server 2008 R2 • Unicode data compression
Database Compression Estimation • SQL Server 2005 SP2 • Sys.sp_estimated_rowsize_reduction_for_vardecimal • SQL Server 2008 & R2 • Sp_estimate_data_compression_savings
Enabling Database Compression • SQL Server 2005 SP2 • Enable database for Vardecimal Storage format • Sp_db_vardecimal_storage_format • Enabling table for Vardecimal Storage format • Sp_tableoption • SQL Server 2008 & R2 • Alter Table [TableName] Rebuild with (Data_compression = Compression Type) • Compression Types • Row • Page • None
Enabling Database Compression • Alter Table [TableName] Rebuild Partition = All with (Data_compression = Compression Type on Partitions (x to n)) • Compression Types • Row • Page • None • Alter Index [IndexName] on [TableName] Rebuild with (Data_compression = Compression Type) • Compression Types • Row • Page • None
Things to consider • Data types not able to be compressed • XML • BLOB • MAX Datatypes • Tables not eligible for compression • Maximum row size + compression overhead > 8060 bytes
Things to consider • Compression with partitions • Splitting a range • Merging a range • Switching partitions
Enabling Backup Compression • Instance level • SSMS • Transact SQL • Defaults can be overidden • Transaction Log Shipping • Maintenance Plans • SSMS • Transact SQL
Compression Estimation Tool • Available from Codeplex • http://ssce.codeplex.com/
Thanks for listening Warwick.rudd@wardyit.com 0403 144 302 http://www.wardyit.com http://www.wardyit.com/blog
Other Resources • http://blogs.msdn.com/b/sqlserverstorageengine/archive/tags/data+compression/ • http://msdn.microsoft.com/en-us/library/dd894051(v=sql.100).aspx#_Appendix_C:_Script • http://msdn.microsoft.com/en-us/library/cc280576.aspx • http://msdn.microsoft.com/en-us/library/cc280464.aspx