当您想到数据压缩时,第一反应是:不要这样做。通常,为了解压缩数据而需要额外的性能周期,这并不值得节省空间。SQL Server 2008的数据压缩是不同的。SQL Server中的数据压缩特性节省了行级或页级的空间。行级压缩查找包含不使用数据类型的全宽度值的固定数据类型,并用压缩代码替换浪费的空间。页级压缩是行级压缩的超集,它的额外好处是压缩同一数据页上不同行中的重复数据。您可以按情况压缩表、索引和分区。根据存储的数据值,有些数据对象比其他数据对象受益更多。预测节省的一种方法是使用SSMS中的数据压缩向导,该向导将根据行或页级压缩给出估计。只需右键单击表或索引并选择存储/管理压缩。 Or use the stored procedure sp_estimate_data_compression_savings. Extra CPU cycles are needed to compress and decompress the data but according to SQLCAT.com the decompress overhead is usually below 10% based on real customer experiences. With Page level compression you may save over 50% in storage which actually reduces the number of data pages needed and therefore reduces I/O. So a little bit of extra CPU may give you a big net gain in performance based on reduced I/O and memory usage. With less storage. A major drawback is that you will need to use SQL Server 2008 Enterprise (or Developer) Edition since data compression is not compatible with other editions or releases. So replicating down-level will not work. Replicating with other editions will not either. You will have to go without data compression or pay up the big bucks. Another drawback is that large object data types stored outside of the row are not compressed. That includes Filestream data. SQLCAT.com has a great white-paper which is now published on MSDN entitled "Data Compression: Strategy, Capacity Planning and Best Practices". Here's the URL: http://msdn.microsoft.com/en-us/library/dd894051.aspx Of course, everything needs to be tested with your real data. As they say, "actual results may vary". Sounds like one of those weight-loss commercials, doesn't it? With some dedicated planning and effort you may just give your data a new lease on life. cheers Brian
数据压缩-检查它
SQL Server
版权©2009Raybet2