---
metadata:
  - name: generator
    content: Diplodoc Platform v5.56.0
alternate:
  - https://ydb.tech/docs/en/yql/reference/syntax/create_table/family.md?version=v26.2
  - https://ydb.tech/docs/ru/yql/reference/syntax/create_table/family.md?version=v26.2
  - href: en/yql/reference/syntax/create_table/family.md
    type: text/markdown
    title: Markdown version
  - href: ../../../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/yql/reference/syntax/create_table/family.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# Column groups


<!-- source: en/_includes/only_allow_for_oltp_note.md -->
{% note warning %}

<!-- source: en/_includes/only_allow_for_oltp_text.md -->
Supported only for [row-oriented](https://ydb.tech/docs/en/concepts/datamodel/table.md?version=v26.2#row-oriented-tables) tables.
<!-- endsource: en/_includes/only_allow_for_oltp_text.md -->

{% endnote %}
<!-- endsource: en/_includes/only_allow_for_oltp_note.md -->


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](https://ydb.tech/docs/en/concepts/datamodel/table.md?version=v26.2#cache-modes). 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.

```yql
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 info %}

Available types of storage devices depend on the YDB cluster configuration.

{% endnote %}
