3 ms·
If you are getting good compression on your primary keys, this may be cause for alarm. These should be high-entropy items.
by bob1029 5y ago
If you are getting good compression on your primary keys, this may be cause for alarm.
These should be high-entropy items.
- jandrewrogers 5y agoThe sole constraint on a primary key is that it is unique. Even in distributed systems, deterministically unique keys are almost always much more compressible than probabilistically unique keys, which is a double win. Should you desire a high-entropy key, e.g. for hash tables or security, this can be trivially derived from the low-entropy key while still guaranteeing deterministic uniqueness. Compressible primary keys are superior in every way.