Skip to content

Commit 14f80cf

Browse files
committed
Update date and images, formatting and versioning
1 parent e4719b0 commit 14f80cf

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

docs/relational-databases/data-compression/data-compression.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Data Compression | Microsoft Docs"
33
description: Apply row and page data compression, or columnstore and columnstore archival compression, using SQL Server and Azure SQL Database.
44
ms.custom: ""
5-
ms.date: "02/05/2021"
5+
ms.date: "02/11/2021"
66
ms.prod: sql
77
ms.prod_service: "database-engine, sql-database"
88
ms.reviewer: ""
@@ -29,7 +29,7 @@ monikerRange: "=azuresqldb-current||>=sql-server-2016||>=sql-server-linux-2017||
2929

3030
[!INCLUDE [sql-asdb-asdbmi](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
3131

32-
[!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] and [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)] support row and page compression for rowstore tables and indexes, and supports columnstore and columnstore archival compression for columnstore tables and indexes.
32+
[!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)], [!INCLUDE[ssSDSfull](../../includes/sssdsfull-md.md)], and [!INCLUDE [sssdsmifull-md](../../includes/sssdsmifull-md.md)] support row and page compression for rowstore tables and indexes, and support columnstore and columnstore archival compression for columnstore tables and indexes.
3333

3434
For rowstore tables and indexes, use the data compression feature to help reduce the size of the database. In addition to saving space, data compression can help improve performance of I/O intensive workloads because the data is stored in fewer pages and queries need to read fewer pages from disk. However, extra CPU resources are required on the database server to compress and decompress the data, while data is exchanged with the application. You can configure row and page compression on the following database objects:
3535
- A whole table that is stored as a heap.
@@ -46,9 +46,9 @@ For columnstore tables and indexes, all columnstore tables and indexes always us
4646
> [!NOTE]
4747
> Data can also be compressed using the GZIP algorithm format. This is an additional step and is most suitable for compressing portions of the data when archiving old data for long-term storage. Data compressed using the `COMPRESS` function cannot be indexed. For more information, see [COMPRESS (Transact-SQL)](../../t-sql/functions/compress-transact-sql.md).
4848
49-
## Considerations row and page compression use
49+
## Row and page compression
5050

51-
When you use row and page compression, be aware the following considerations:
51+
When you use row and page compression, be aware the following considerations:
5252
- The details of data compression are subject to change without notice in service packs or subsequent releases.
5353
- Compression is available in [!INCLUDE[ssSDSfull_md](../../includes/sssdsfull-md.md)]
5454
- Compression is not available in every edition of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. For more information, see [Features Supported by the Editions of SQL Server 2016](~/sql-server/editions-and-supported-features-for-sql-server-2016.md).
@@ -77,19 +77,15 @@ For columnstore tables and indexes, all columnstore tables and indexes always us
7777
> [!NOTE]
7878
> [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] supports the vardecimal storage format; however, because row-level compression achieves the same goals, the vardecimal storage format is deprecated. [!INCLUDE[ssNoteDepFutureAvoid](../../includes/ssnotedepfutureavoid-md.md)]
7979
80-
## Using Columnstore and Columnstore archive compression
81-
82-
[!INCLUDE [sql-asdb-asdbmi](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
83-
84-
### Basics
80+
## Columnstore and columnstore archive compression
8581

8682
Columnstore tables and indexes are always stored with columnstore compression. You can further reduce the size of columnstore data by configuring an additional compression called archival compression. To perform archival compression, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] runs the Microsoft XPRESS compression algorithm on the data. Add or remove archival compression by using the following data compression types:
8783
- Use **COLUMNSTORE_ARCHIVE** data compression to compress columnstore data with archival compression.
8884
- Use **COLUMNSTORE** data compression to decompress archival compression. The resulting data continue to be compressed with columnstore compression.
8985

9086
To add archival compression, use [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md) or [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md) with the REBUILD option and DATA COMPRESSION = COLUMNSTORE_ARCHIVE.
9187

92-
#### Examples:
88+
For example:
9389

9490
```sql
9591
ALTER TABLE ColumnstoreTable1
@@ -103,9 +99,9 @@ REBUILD PARTITION = ALL WITH (DATA_COMPRESSION = COLUMNSTORE_ARCHIVE ON PARTITI
10399
```
104100

105101
To remove archival compression and restore the data to columnstore compression, use [ALTER TABLE (Transact-SQL)](../../t-sql/statements/alter-table-transact-sql.md) or [ALTER INDEX (Transact-SQL)](../../t-sql/statements/alter-index-transact-sql.md) with the REBUILD option and DATA COMPRESSION = COLUMNSTORE.
106-
107-
#### Examples:
108-
102+
103+
For example:
104+
109105
```sql
110106
ALTER TABLE ColumnstoreTable1
111107
REBUILD PARTITION = 1 WITH (DATA_COMPRESSION = COLUMNSTORE) ;
@@ -141,7 +137,7 @@ The following system views contain information about data compression for cluste
141137

142138
The procedure [sp_estimate_data_compression_savings (Transact-SQL)](../../relational-databases/system-stored-procedures/sp-estimate-data-compression-savings-transact-sql.md) can also apply to columnstore indexes.
143139

144-
## How compression affects partitioned tables and indexes
140+
## Impact on partitioned tables and indexes
145141

146142
When you use data compression with partitioned tables and indexes, be aware of the following considerations:
147143
- When partitions are split by using the `ALTER PARTITION` statement, both partitions inherit the data compression attribute of the original partition.
@@ -174,8 +170,6 @@ The procedure [sp_estimate_data_compression_savings (Transact-SQL)](../.
174170

175171
## How compression affects replication
176172

177-
[!INCLUDE [sql-asdb-asdbmi](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
178-
179173
When you are using data compression with replication, be aware of the following considerations:
180174
- When the Snapshot Agent generates the initial schema script, the new schema uses the same compression settings for both the table and its indexes. Compression cannot be enabled on just the table and not the index.
181175
- For transactional replication the article schema option determines what dependent objects and properties have to be scripted. For more information, see [sp_addarticle](../../relational-databases/system-stored-procedures/sp-addarticle-transact-sql.md).
@@ -192,7 +186,7 @@ The following table shows replication settings that control compression during r
192186
|To not replicate the partition scheme and not compress the data on the Subscriber.|False|False|Does not script partition or compression settings.|
193187
|To compress the table on the Subscriber if all the partitions are compressed on the Publisher, but not replicate the partition scheme.|False|True|Checks if all the partitions are enabled for compression.<br /><br /> Scripts out compression at the table level.|
194188

195-
## How compression affects other SQL server components
189+
## Impact on other SQL server components
196190

197191
[!INCLUDE [sql-asdb-asdbmi](../../includes/applies-to-version/sql-asdb-asdbmi.md)]
198192

0 commit comments

Comments
 (0)