From 30289001c6e121ce10606c383d41c1d3179dba29 Mon Sep 17 00:00:00 2001 From: mar Date: Wed, 3 Jun 2026 11:40:28 +0300 Subject: [PATCH 1/4] doc: add column compression chapter --- doc/platform/ddl_dml/column_compression.rst | 41 +++++++++++++++++++++ doc/platform/ddl_dml/value_store.rst | 1 + 2 files changed, 42 insertions(+) create mode 100644 doc/platform/ddl_dml/column_compression.rst diff --git a/doc/platform/ddl_dml/column_compression.rst b/doc/platform/ddl_dml/column_compression.rst new file mode 100644 index 0000000000..5298d18c76 --- /dev/null +++ b/doc/platform/ddl_dml/column_compression.rst @@ -0,0 +1,41 @@ +.. _column_compression: + +Column compression +================== + +.. admonition:: Enterprise Edition + :class: fact + + Column compression is available in the `Enterprise Edition `_ only. + +Column compression, introduced in Tarantool Enterprise Edition 3.7.0, aims +to save memory space. It compresses a range of consecutive values and +stores them in a compressed block. Default block size is 50-100 values. + +The following compression algorithms are supported: + +- [lz4](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)) +- [zstd](https://en.wikipedia.org/wiki/Zstd) +- [zlib](https://en.wikipedia.org/wiki/Zlib) + +A column of any type can be compressed, however the "external" values +(the strings that are longer than 12 characters) are not yet compressed. + +.. note:: + + Only non-indexed columns can be compressed. + The compression can be enabled only during the space creation. + + +Example: + +.. code-block:: lua + + local format = { + {'c1', 'uint64'}, + {'c2', 'string', is_nullable = true, compression = 'lz4'}, + {'c3', 'int32', compression = {type = 'lz4', acceleration = 1000}}, + } + box.schema.create_space('test', { + engine = 'memcs', field_count = #format, format = format, + }) diff --git a/doc/platform/ddl_dml/value_store.rst b/doc/platform/ddl_dml/value_store.rst index 3060f3dec9..b82144262b 100644 --- a/doc/platform/ddl_dml/value_store.rst +++ b/doc/platform/ddl_dml/value_store.rst @@ -882,3 +882,4 @@ you will get an error. indexes using_indexes tuple_compression + column_compression From 8c488fff8854442bd2e7338116edb0b10e3c3642 Mon Sep 17 00:00:00 2001 From: mar Date: Thu, 4 Jun 2026 13:24:22 +0300 Subject: [PATCH 2/4] doc: add column compression chapter --- doc/platform/ddl_dml/column_compression.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/platform/ddl_dml/column_compression.rst b/doc/platform/ddl_dml/column_compression.rst index 5298d18c76..fb9660083e 100644 --- a/doc/platform/ddl_dml/column_compression.rst +++ b/doc/platform/ddl_dml/column_compression.rst @@ -14,9 +14,9 @@ stores them in a compressed block. Default block size is 50-100 values. The following compression algorithms are supported: -- [lz4](https://en.wikipedia.org/wiki/LZ4_(compression_algorithm)) -- [zstd](https://en.wikipedia.org/wiki/Zstd) -- [zlib](https://en.wikipedia.org/wiki/Zlib) +* `lz4 `_ +* `zstd `_ +* `zlib `_ A column of any type can be compressed, however the "external" values (the strings that are longer than 12 characters) are not yet compressed. From 23bef4a4dbbee89e3ce882f0644e7f521b6f57cc Mon Sep 17 00:00:00 2001 From: mar Date: Tue, 9 Jun 2026 14:33:16 +0300 Subject: [PATCH 3/4] doc: add column compression chapter --- doc/platform/ddl_dml/column_compression.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/platform/ddl_dml/column_compression.rst b/doc/platform/ddl_dml/column_compression.rst index fb9660083e..e58a97006d 100644 --- a/doc/platform/ddl_dml/column_compression.rst +++ b/doc/platform/ddl_dml/column_compression.rst @@ -6,7 +6,8 @@ Column compression .. admonition:: Enterprise Edition :class: fact - Column compression is available in the `Enterprise Edition `_ only. + Column compression is available exclusively in the `Enterprise Edition `_. + Now supported only by the MemCS engine. Column compression, introduced in Tarantool Enterprise Edition 3.7.0, aims to save memory space. It compresses a range of consecutive values and @@ -27,6 +28,14 @@ A column of any type can be compressed, however the "external" values The compression can be enabled only during the space creation. +Compression settings: + +* `acceleration` – LZ4-specific configuration parameter: + + - allowed range: 1…65537 + - recommended: 10…1000 + - higher values improve compression and decompression speed, but reduce the compression ratio + Example: .. code-block:: lua From 42fc192b91331d2d7b3f7cd1298be927be3b24ab Mon Sep 17 00:00:00 2001 From: mar Date: Tue, 9 Jun 2026 16:48:12 +0300 Subject: [PATCH 4/4] doc: add column compression chapter --- doc/platform/ddl_dml/column_compression.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/platform/ddl_dml/column_compression.rst b/doc/platform/ddl_dml/column_compression.rst index e58a97006d..9b0eb44da9 100644 --- a/doc/platform/ddl_dml/column_compression.rst +++ b/doc/platform/ddl_dml/column_compression.rst @@ -26,6 +26,7 @@ A column of any type can be compressed, however the "external" values Only non-indexed columns can be compressed. The compression can be enabled only during the space creation. + Strings longer than **12 bytes** are currently **not compressed** Compression settings: