Skip to content

Commit 7d8eb7d

Browse files
authored
Add note about limitation for multikey indexes (#3114)
* Add limitation * Add translations
1 parent bda71ea commit 7d8eb7d

File tree

4 files changed

+62
-29
lines changed

4 files changed

+62
-29
lines changed

doc/book/box/limitations.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ Limitations
4949
such as :ref:`Number of bytes in a tuple <limitations_bytes_in_tuple>`,
5050
not by the index support.
5151

52+
.. _limitations_fields_in_tuple_multikey_index:
53+
54+
**Number of elements in array fields in a space with a multikey index**
55+
56+
In a Tarantool space that has :ref:`multikey indexes <box_space-path_multikey>`,
57+
any tuple cannot contain more than ~8,000 elements in a field indexed with that multikey index.
58+
This is because every element has 4 bytes of metadata, and the tuple's metadata,
59+
which includes multikey metadata, cannot exceed 2^16 bytes.
60+
5261
.. _limitations_number_of_spaces:
5362

5463
**Number of spaces**

doc/reference/reference_lua/box_space/create_index.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -536,16 +536,18 @@ The result of the select request looks like this:
536536
537537
Some restrictions exist:
538538

539-
* ``[*]`` must be alone or must be at the end of a name in the path
540-
* ``[*]`` must not appear twice in the path
541-
* if an index has a path with ``x[*]`` then no other index can have a path with
542-
x.component
543-
* ``[*]`` must not appear in the path of a primary-key
544-
* if an index has ``unique=true`` and has a path with ``[*]``
545-
then duplicate keys from different tuples are disallowed but duplicate keys
546-
for the same tuple are allowed
547-
* the field's value must have the same structure as in the path definition,
548-
or be nil (nil is not indexed)
539+
* ``[*]`` must be alone or must be at the end of a name in the path.
540+
* ``[*]`` must not appear twice in the path.
541+
* If an index has a path with ``x[*]``, then no other index can have a path with
542+
x.component.
543+
* ``[*]`` must not appear in the path of a primary key.
544+
* If an index has ``unique=true`` and has a path with ``[*]``,
545+
then duplicate keys from different tuples are disallowed, but duplicate keys
546+
for the same tuple are allowed.
547+
* The field's value must have the same structure as in the path definition,
548+
or be nil (nil is not indexed).
549+
* In a space with multikey indexes, any tuple cannot contain
550+
:ref:`more than ~8,000 elements <limitations_fields_in_tuple_multikey_index>` indexed that way.
549551

550552
.. _box_space-index_func:
551553

locale/ru/LC_MESSAGES/book/box/limitations.po

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ msgstr ""
7171
"такими факторами, как :ref:`количество байтов в кортеже "
7272
"<limitations_bytes_in_tuple>`, а не параметрами индекса."
7373

74+
msgid "**Number of elements in array fields in a space with a multikey index**"
75+
msgstr "**Количество элементов в полях-массивах, входящих в индекс по массиву (multikey)**"
76+
77+
msgid ""
78+
"In a Tarantool space that has :ref:`multikey indexes <box_space-path_multikey>`, "
79+
"any tuple cannot contain more than ~8,000 elements in a field indexed with that multikey index. "
80+
"This is because every element has 4 bytes of metadata, and the tuple's metadata, "
81+
which includes multikey metadata, cannot exceed 2^16 bytes."
82+
msgstr ""
83+
"В спейсе, где определен один или несколько :ref:`индексов по массивам <box_space-path_multikey>` "
84+
"(multikey), кортеж может содержать не более ~8000 элементов в каждом поле-массиве. "
85+
"Это связано с тем, что метаданные каждого элемента занимают 4 байта, а объем метаданных кортежа, "
86+
"включая метаданные индекса, не может превышать 2^16 байтов."
87+
7488
msgid "**Number of spaces**"
7589
msgstr "**Количество спейсов**"
7690

locale/ru/LC_MESSAGES/reference/reference_lua/box_space/create_index.po

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -937,37 +937,45 @@ msgstr ""
937937
msgid "Some restrictions exist:"
938938
msgstr "Есть некоторые ограничения:"
939939

940-
msgid "``[*]`` must be alone or must be at the end of a name in the path"
941-
msgstr "символ ``[*]`` должен стоять отдельно или в конце имени в пути"
940+
msgid "``[*]`` must be alone or must be at the end of a name in the path."
941+
msgstr "символ ``[*]`` должен стоять отдельно или в конце имени в пути."
942942

943-
msgid "``[*]`` must not appear twice in the path"
944-
msgstr "символ ``[*]`` не должен повторяться в пути"
943+
msgid "``[*]`` must not appear twice in the path."
944+
msgstr "символ ``[*]`` не должен повторяться в пути."
945945

946946
msgid ""
947-
"if an index has a path with ``x[*]`` then no other index can have a path "
948-
"with x.component"
947+
"If an index has a path with ``x[*]``, then no other index can have a path "
948+
"with x.component."
949949
msgstr ""
950-
"если в индексе есть путь с ``x[*]``, то в никаком другом индексе не может "
951-
"быть пути с x.компонентом"
950+
"Если в индексе есть путь с ``x[*]``, то в никаком другом индексе не может "
951+
"быть пути с x.компонентом,"
952952

953-
msgid "``[*]`` must not appear in the path of a primary-key"
954-
msgstr "``[*]`` нельзя указывать в пути первичного ключа"
953+
msgid "``[*]`` must not appear in the path of a primary key."
954+
msgstr "``[*]`` нельзя указывать в пути первичного ключа."
955955

956956
msgid ""
957-
"if an index has ``unique=true`` and has a path with ``[*]`` then duplicate "
958-
"keys from different tuples are disallowed but duplicate keys for the same "
959-
"tuple are allowed"
957+
"If an index has ``unique=true`` and has a path with ``[*]``, then duplicate "
958+
"keys from different tuples are disallowed, but duplicate keys for the same "
959+
"tuple are allowed."
960960
msgstr ""
961-
"если индекс должен быть уникальным (``unique=true``), и в нем есть путь с "
961+
"Если индекс должен быть уникальным (``unique=true``) и в нем есть путь с "
962962
"символом ``[*]``, то запрещается использовать дублирующиеся ключи в разных "
963-
"кортежах, но в в одном кортеже можно использовать дублирующиеся ключи"
963+
"кортежах, но в в одном кортеже можно использовать дублирующиеся ключи."
964964

965965
msgid ""
966-
"the field's value must have the same structure as in the path definition, or"
967-
" be nil (nil is not indexed)"
966+
"The field's value must have the same structure as in the path definition, or"
967+
" be nil (nil is not indexed)."
968968
msgstr ""
969-
"структура значения поля должна соответствовать стуктуре, заданной в "
970-
"определении пути, или значение поля должно быть nil (nil не индексируется)"
969+
"Структура значения поля должна соответствовать стуктуре, заданной в "
970+
"определении пути, или значение поля должно быть nil (nil не индексируется).
971+
972+
msgid ""
973+
"In a space with multikey indexes, any tuple cannot contain "
974+
":ref:`more than ~8,000 elements <limitations_fields_in_tuple_multikey_index>` indexed that way."
975+
msgstr ""
976+
"В спейсе с индексами по массивам можно хранить не более "
977+
":ref:`~8000 элементов <limitations_fields_in_tuple_multikey_index>`, "
978+
"проиндексированных таким образом."
971979

972980
msgid "Creating a functional index"
973981
msgstr "Создание функционального индекса"

0 commit comments

Comments
 (0)