Skip to content

Document layout index option in memcs #5067

Open
@TarantoolBot

Description

@TarantoolBot

Product: Tarantool Enterprise Edition
Since: 3.4.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/create_index/#index-opts-object

index_opts.layout

MemCS only

Specifies how a column within the index is physically stored.

Possible values:

  • If not set (or set to an empty string), the default plain layout is used;
  • If set to "null_rle", the run-length encoding of NULL values is used.
    It applies to nullable columns that are not listed in index parts, for
    example:
local format = {
    { 'c1', 'unsigned' },
    { 'c2', 'unsigned', is_nullable = true },
    { 'c3', 'unsigned', is_nullable = true },
    { 'c4', 'unsigned' },
    { 'c5', 'unsigned', is_nullable = true },
box.schema.create_space('test', {
    engine = 'memcs', format = format, field_count = #format })
box.space.test:create_index('primary', {
    parts = { 'c1' }, layout = 'null_rle' })
box.space.test:create_index('secondary', {
    parts = { 'c1', 'c2' }, covers = { 'c3', 'c4' }, layout = 'null_rle' })

In this example "null_rle" layout is applied to c2, c3, c5 in the primary
index, and to c3 in the secondary index.

Type: string
Default: not set
Requested by @Gumix in https://github.com/tarantool/tarantool-ee/commit/df5629abd6f3b5e81b01973bb20f653905582857.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions