Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions doc/platform/ddl_dml/column_compression.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. _column_compression:

Column compression
==================

.. admonition:: Enterprise Edition
:class: fact

Column compression is available exclusively in the `Enterprise Edition <https://www.tarantool.io/compare/>`_.
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
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.
Strings longer than **12 bytes** are currently **not compressed**


Comment thread
Gumix marked this conversation as resolved.
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

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,
})
1 change: 1 addition & 0 deletions doc/platform/ddl_dml/value_store.rst
Original file line number Diff line number Diff line change
Expand Up @@ -882,3 +882,4 @@ you will get an error.
indexes
using_indexes
tuple_compression
column_compression
Loading