diff --git a/ydb/docs/en/core/dev/primary-key/row-oriented.md b/ydb/docs/en/core/dev/primary-key/row-oriented.md index f217287c5ffa..05cc3056aede 100644 --- a/ydb/docs/en/core/dev/primary-key/row-oriented.md +++ b/ydb/docs/en/core/dev/primary-key/row-oriented.md @@ -22,7 +22,7 @@ Writing data to a table with the ```( timestamp, userid, userevent, PRIMARY KEY ### Using a hash of key column values as a primary key {#key-hash} -To obtain a more even distribution of inserts across a table's partitions, make the primary key "prefix" (initial part) values more varied. To do this, make the primary key include the value of a hash of the entire primary key or a part of the primary key. +To obtain a more even distribution of operations across a table's partitions and reduce the size of internal data structures, make the primary key "prefix" (initial part) values more varied. To do this, make the primary key include the value of a hash of the entire primary key or a part of the primary key. For instance, the schema of this table with the schema ```( timestamp, userid, userevent, PRIMARY KEY (userid, timestamp) )``` might be made to include an additional field computed as a hash: ```userhash = HASH(userid)```. This would change the table schema as follows: diff --git a/ydb/docs/ru/core/dev/primary-key/row-oriented.md b/ydb/docs/ru/core/dev/primary-key/row-oriented.md index ec47b8d8311b..a0bf81d74c95 100644 --- a/ydb/docs/ru/core/dev/primary-key/row-oriented.md +++ b/ydb/docs/ru/core/dev/primary-key/row-oriented.md @@ -22,7 +22,7 @@ ### Использование хеша от значений ключевых колонок в качестве первичного ключа {#key-hash} -Для получения более равномерного распределения операций вставки между партициями таблицы необходимо увеличить разнообразие значений "префикса" (начальной части) первичного ключа. Для этого можно включить в первичный ключ значение хеш-кода от всего первичного ключа или его части. +Для получения более равномерного распределения операций между партициями таблицы, а также уменьшения размеров внутренних структур данных, необходимо увеличить разнообразие значений "префикса" (начальной части) первичного ключа. Для этого можно включить в первичный ключ значение хеш-кода от всего первичного ключа или его части. Например, в рассматриваемую таблицу со схемой ```( timestamp, userid, userevent, PRIMARY KEY (userid, timestamp) )``` можно включить дополнительное поле, рассчитываемое как хеш-код: ```userhash = HASH(userid)```. В результате схема таблицы преобразуется к следующему виду: