From 79481b53b4801f845d11f51c187ea5d6adb59f07 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Sun, 28 Apr 2024 07:46:09 +0800 Subject: [PATCH] doc: refine compression --- docs/en/21-tdinternal/08-compress.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/en/21-tdinternal/08-compress.md b/docs/en/21-tdinternal/08-compress.md index 0c25c8d83c..a3b073c3a7 100644 --- a/docs/en/21-tdinternal/08-compress.md +++ b/docs/en/21-tdinternal/08-compress.md @@ -1,12 +1,14 @@ --- -title: Configurable Storage Compression +title: Configurable Column Compression description: Configurable column storage compression method --- # Configurable Storage Compression +Since TDengine 3.3.0.0, more advanced compression feature is introduced, you can specify compression or not, the compression method and compression level for each column. + ## Compression Terminology Definition ### Compression Level Definition @@ -40,11 +42,11 @@ In this article, it specifically refers to the level within the secondary compre Note: For floating point types, if configured as tsz, its precision is determined by the global configuration of taosd. If configured as tsz, but the lossy compression flag is not configured, lz4 is used for compression by default. -## SQL 语法 +## SQL -### Specify the compression method when creating a table +### Create Table with Compression -``` +```sql CREATE [dbname.]tabname (colName colType [ENCODE 'encode_type'] [COMPRESS 'compress_type' [LEVEL 'level'], [, other cerate_definition]...]) ``` @@ -59,9 +61,9 @@ CREATE [dbname.]tabname (colName colType [ENCODE 'encode_type'] [COMPRESS 'compr - Specify the compression method for the column when creating a table -### Change the compression method of the column +### Change Compression Method -``` +```sql ALTER TABLE [db_name.]tabName MODIFY COLUMN colName [ENCODE 'ecode_type'] [COMPRESS 'compress_type'] [LEVEL "high"] ``` @@ -74,9 +76,9 @@ ALTER TABLE [db_name.]tabName MODIFY COLUMN colName [ENCODE 'ecode_type'] [COMPR - Change the compression method of the column -### View the compression method of the column +### View Compression Dethod -``` +```sql DESCRIBE [dbname.]tabName ``` @@ -87,4 +89,4 @@ DESCRIBE [dbname.]tabName ## Compatibility - Fully compatible with existing data -- Does not support rollback +- Can't be rolled back once you upgrade to 3.3.0.0