Skip to content

Commit ec0d7ce

Browse files
committed
Number of tuples in hash index
1 parent f61f57f commit ec0d7ce

File tree

1 file changed

+74
-53
lines changed

1 file changed

+74
-53
lines changed

doc/reference/limitations.rst

Lines changed: 74 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,128 @@
11
.. _limitations_fields_in_index:
22
.. _tarantool_limitations:
33

4-
================================================================================
54
Limitations
6-
================================================================================
5+
===========
76

8-
**Number of parts in an index**
7+
.. _limitations_parts_in_index:
98

10-
For TREE or HASH indexes, the maximum
11-
is 255 (``box.schema.INDEX_PART_MAX``). For :ref:`RTREE <box_index-rtree>` indexes, the
12-
maximum is 1 but the field is an ARRAY of up to 20 dimensions.
13-
For BITSET indexes, the maximum is 1.
9+
Number of parts in an index
10+
---------------------------
11+
12+
For TREE or HASH indexes, the maximum
13+
is 255 (``box.schema.INDEX_PART_MAX``). For :ref:`RTREE <box_index-rtree>` indexes, the
14+
maximum is 1 but the field is an ARRAY of up to 20 dimensions.
15+
For BITSET indexes, the maximum is 1.
16+
17+
.. _limitations_tuples_in_hash_index:
18+
19+
Number of tuples in a hash index
20+
--------------------------------
21+
22+
4294967288 (2\ :sup:`32`-8)
1423

1524
.. _limitations_indexes_in_space:
1625

17-
**Number of indexes in a space**
26+
Number of indexes in a space
27+
----------------------------
1828

19-
128 (``box.schema.INDEX_MAX``).
29+
128 (``box.schema.INDEX_MAX``).
2030

2131
.. _limitations_fields_in_tuple:
2232

23-
**Number of fields in a tuple**
33+
Number of fields in a tuple
34+
---------------------------
2435

25-
The theoretical maximum is 2,147,483,647 (``box.schema.FIELD_MAX``). The
26-
practical maximum is whatever is specified by the space's
27-
:ref:`field_count <box_space-field_count>`
28-
member, or the maximal tuple length.
36+
The theoretical maximum is 2,147,483,647 (``box.schema.FIELD_MAX``). The
37+
practical maximum is whatever is specified by the space's
38+
:ref:`field_count <box_space-field_count>`
39+
member, or the maximal tuple length.
2940

3041
.. _limitations_bytes_in_tuple:
3142

32-
**Number of bytes in a tuple**
43+
Number of bytes in a tuple
44+
--------------------------
3345

34-
The maximal number of bytes in a tuple is roughly equal to
35-
:ref:`memtx_max_tuple_size <cfg_storage-memtx_max_tuple_size>` or
36-
:ref:`vinyl_max_tuple_size <cfg_storage-vinyl_max_tuple_size>`
37-
(with a metadata
38-
overhead of about 20 bytes per tuple, which is added on top of useful bytes).
39-
By default, the value of either ``memtx_max_tuple_size`` or
40-
``vinyl_max_tuple_size`` is 1,048,576. To increase it,
41-
specify a larger value when starting the Tarantool instance.
42-
For example, ``box.cfg{memtx_max_tuple_size=2*1048576}``.
46+
The maximal number of bytes in a tuple is roughly equal to
47+
:ref:`memtx_max_tuple_size <cfg_storage-memtx_max_tuple_size>` or
48+
:ref:`vinyl_max_tuple_size <cfg_storage-vinyl_max_tuple_size>`
49+
(with a metadata
50+
overhead of about 20 bytes per tuple, which is added on top of useful bytes).
51+
By default, the value of either ``memtx_max_tuple_size`` or
52+
``vinyl_max_tuple_size`` is 1,048,576. To increase it,
53+
specify a larger value when starting the Tarantool instance.
54+
For example, ``box.cfg{memtx_max_tuple_size=2*1048576}``.
4355

4456
.. _limitations_bytes_in_index_key:
4557

46-
**Number of bytes in an index key**
58+
Number of bytes in an index key
59+
-------------------------------
4760

48-
If a field in a tuple can contain a million bytes, then the index key
49-
can contain a million bytes, so the maximum is determined by factors
50-
such as :ref:`Number of bytes in a tuple <limitations_bytes_in_tuple>`,
51-
not by the index support.
61+
If a field in a tuple can contain a million bytes, then the index key
62+
can contain a million bytes, so the maximum is determined by factors
63+
such as :ref:`Number of bytes in a tuple <limitations_bytes_in_tuple>`,
64+
not by the index support.
5265

5366
.. _limitations_fields_in_tuple_multikey_index:
5467

55-
**Number of elements in array fields in a space with a multikey index**
68+
Number of elements in array fields in a space with a multikey index
69+
-------------------------------------------------------------------
5670

57-
In a Tarantool space that has :ref:`multikey indexes <box_space-path_multikey>`,
58-
any tuple cannot contain more than ~8,000 elements in a field indexed with that multikey index.
59-
This is because every element has 4 bytes of metadata, and the tuple's metadata,
60-
which includes multikey metadata, cannot exceed 2^16 bytes.
71+
In a Tarantool space that has :ref:`multikey indexes <box_space-path_multikey>`,
72+
any tuple cannot contain more than ~8,000 elements in a field indexed with that multikey index.
73+
This is because every element has 4 bytes of metadata, and the tuple's metadata,
74+
which includes multikey metadata, cannot exceed 2^16 bytes.
6175

6276
.. _limitations_number_of_spaces:
6377

64-
**Number of spaces**
78+
Number of spaces
79+
----------------
6580

66-
The theoretical maximum is 2147483646 (``box.schema.SPACE_MAX``)
67-
but the practical maximum is around 65,000.
81+
The theoretical maximum is 2147483646 (``box.schema.SPACE_MAX``)
82+
but the practical maximum is around 65,000.
6883

6984
.. _limitations_number_of_connections:
7085

71-
**Number of connections**
86+
Number of connections
87+
---------------------
7288

73-
The practical limit is the number of file descriptors that one can set
74-
with the operating system.
89+
The practical limit is the number of file descriptors that one can set
90+
with the operating system.
7591

7692
.. _limitations_space_size:
7793

78-
**Space size**
94+
Space size
95+
----------
7996

80-
The total maximum size for all spaces is in effect set by
81-
:ref:`memtx.memory <configuration_reference_memtx_memory>`, which in turn
82-
is limited by the total available memory.
97+
The total maximum size for all spaces is in effect set by
98+
:ref:`memtx.memory <configuration_reference_memtx_memory>`, which in turn
99+
is limited by the total available memory.
83100

84101
.. _limitations_update_ops:
85102

86-
**Update operations count**
103+
Update operations count
104+
-----------------------
87105

88-
The maximum number of operations per tuple that can be in a single update
89-
is 4000 (``BOX_UPDATE_OP_CNT_MAX``).
106+
The maximum number of operations per tuple that can be in a single update
107+
is 4000 (``BOX_UPDATE_OP_CNT_MAX``).
90108

91109
.. _limitations_users_and_roles:
92110

93-
**Number of users and roles**
111+
Number of users and roles
112+
-------------------------
94113

95-
32 (``BOX_USER_MAX``).
114+
32 (``BOX_USER_MAX``).
96115

97116
.. _limitations_length:
98117

99-
**Length of an index name or space name or user name**
118+
Length of an index name or space name or user name
119+
--------------------------------------------------
100120

101-
65000 (``box.schema.NAME_MAX``).
121+
65000 (``box.schema.NAME_MAX``).
102122

103123
.. _limitations_replicas:
104124

105-
**Number of replicas in a replica set**
125+
Number of replicas in a replica set
126+
-----------------------------------
106127

107-
32 (``vclock.VCLOCK_MAX``).
128+
32 (``vclock.VCLOCK_MAX``).

0 commit comments

Comments
 (0)