8000 [Uid] Mention that UUID v6 also solves the index fragmentation issue · symfony/symfony-docs@2cbc55e · GitHub
[go: up one dir, main page]

Skip to content

Commit 2cbc55e

Browse files
committed
[Uid] Mention that UUID v6 also solves the index fragmentation issue
1 parent 2deff6d commit 2cbc55e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/uid.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ It's the same as UUIDv3 (explained above) but it uses ``sha1`` instead of
9797
``md5`` to hash the given namespace and name (`read UUIDv5 spec <https://datatracker.ietf.org/doc/html/draft-ietf-uuidrev-rfc4122bis#name-uuid-version-5>`__).
9898
This makes it more secure and less prone to hash collisions.
9999

100+
.. _uid-uuid-v6:
101+
100102
**UUID v6** (reordered time-based)
101103

102104
It rearranges the time-based fields of the UUIDv1 to make it lexicographically
@@ -351,8 +353,8 @@ entity primary keys::
351353
Using UUIDs as primary keys is usually not recommended for performance reasons:
352354
indexes are slower and take more space (because UUIDs in binary format take
353355
128 bits instead of 32/64 bits for auto-incremental integers) and the non-sequential
354-
nature of UUIDs fragments indexes. :ref:`UUID v7 <uid-uuid-v7>` is the only
355-
variant that solves the fragmentation issue (but the index size issue remains).
356+
nature of UUIDs fragments indexes. :ref:`UUID v6 <uid-uuid-v6>` and :ref:`UUID v7 <uid-uuid-v7>`
357+
are the only variants that solves the fragmentation issue (but the index size issue remains).
356358

357359
When using built-in Doctrine repository methods (e.g. ``findOneBy()``), Doctrine
358360
knows how to convert these UUID types to build the SQL query

0 commit comments

Comments
 (0)
0