Skip to content

Document layout index option in memcs #5067

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TarantoolBot opened this issue Apr 8, 2025 · 0 comments
Open

Document layout index option in memcs #5067

TarantoolBot opened this issue Apr 8, 2025 · 0 comments

Comments

@TarantoolBot
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant