Skip to content

Commit e7a8fc8

Browse files
authored
fixes gh-1131 add note about basing primary keys onn the first fields of a tuple (#1167)
1 parent 6f7c772 commit e7a8fc8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/book/box/data_model.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ An index definition may include identifiers of tuple fields and their expected
9393
**types** (see allowed :ref:`indexed field types <index-box_indexed-field-types>`
9494
below).
9595

96+
.. NOTE::
97+
98+
A recommended design pattern for a data model is to base primary keys on the
99+
first fields of a tuple, because this speeds up tuple comparison.
100+
96101
In our example, we first defined the primary index (named 'primary') based on
97102
field #1 of each tuple:
98103

0 commit comments

Comments
 (0)