GUIDE深度 · Deep dive
UUID Versions Explained
UUID has several versions: v4 is random, v7 puts time first so it sorts, and v1/v6 are time-based with different privacy/order properties. v4 or v7 are common for primary keys.
Choosing
v4: simple, random, not sortable.
v7: time prefix, friendlier for indexes.
v1/v6: time plus node; mind privacy.
Storage
Store as 16-byte binary/UUID, not a 36-character string key.
Random v4 indexes can cause page splits; v7 is friendlier.
FAQ
Can UUIDs be passwords?
No; low predictability but wrong length and purpose.
UUID or ULID?
Use UUID for standards; ULID for shorter sortable IDs.
Sources
Related calculators
UUID GeneratorGenerate UUID v4 in bulk with optional uppercase, locally.More guides
UUIDs as Primary KeysRead guideKEEP READING
继续读
按顺序读,或跳到同主题的其他指南。