Hi Friends,
In general, compression is a good thing. Even better, you can check the estimated compression savings before you actually compress. For example, you want to compress FactInternetSales table in AdventureWorksDW. Following is what you can do:
First you can check the size of the table:
use AdventureWorksDW GO EXEC sp_spaceused N'FactInternetSales' GO
Next, you can estimate the compression savings using the sp_estimate_data_compression_savings stored procedure:
For row compression:
exec sp_estimate_data_compression_savings 'dbo', 'FactInternetSales', NULL, NULL, 'ROW'
For page compression:
exec sp_estimate_data_compression_savings 'dbo', 'FactInternetSales', NULL, NULL, 'PAGE'
The output is self-explanatory. It’s a good thing to calculate the savings rather than compress a very large table only to realize that you aren’t happy with the compression ratio.