Column groups
Warning
Supported only for row-oriented tables.
Columns of the same table can be grouped to set the following parameters:
DATA: A storage device type for the data in this column group. Acceptable values:"ssd","rot".COMPRESSION: A data compression codec. Acceptable values:"off","lz4".CACHE_MODE: Caching mode. Acceptable values:"in_memory","regular".
By default, all columns are in the same group named default. If necessary, the parameters of this group can also be redefined, if they are not redefined, then predefined values are applied.
Example
In the example below, for the created table, the family_large group of columns is added and set for the series_info column, and the parameters for the default group, which is set by default for all other columns, are also redefined.
CREATE TABLE series_with_families (
series_id Uint64,
title Utf8,
series_info Utf8 FAMILY family_large,
release_date Uint64,
PRIMARY KEY (series_id),
FAMILY default (
DATA = "ssd",
COMPRESSION = "off",
CACHE_MODE = "in_memory"
),
FAMILY family_large (
DATA = "rot",
COMPRESSION = "lz4",
CACHE_MODE = "regular"
)
);
Note
Available types of storage devices depend on the YDB cluster configuration.
Was the article helpful?
Previous
Next