Download SQL Server Compression

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
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 Matrix
SQL Server
2005 SP2
Edition
Enterprise
SQL Server
2008
SQL Server
2008 R2
Enterprise
Enterprise &
Data Center
Compression
Type
VarDecimal

Row Level


Page Level


Unicode

Database Compression Cost Benefit
Analysis
Benefits
Performance improvements
• More data in memory
• Reduced I/O
Reduced disk space usage
• Database data files
• Backup files
Reduced time to backup
Cost Savings
Cost
Increased CPU utilisation
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
SQL Server Database Compression Demo
Backup Compression Matrix
SQL Server
2005 SP2
SQL Server
2008
SQL Server
2008 R2
Edition

Standard
Enterprise
Datacenter



Backup Compression Cost Benefit
Analysis
Benefits
Performance improvements
• Reduced I/O
Reduced disk space usage
Reduced time to backup
Cost Savings
Cost
Increased CPU utilisation
Enabling Backup Compression
• Instance level
– SSMS
– Transact SQL
• Defaults can be overidden
– Transaction Log Shipping
– Maintenance Plans
– SSMS
– Transact SQL
SQL Server Backup Compression Demo
Compression Estimation Tool
• Available from Codeplex
– http://ssce.codeplex.com/
Compression Estimation Tool Demo
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/da
ta+compression/
• http://msdn.microsoft.com/enus/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
Related documents