11 ms·
Given schema is limited to where uuid v4 usage is relevant/appropriate. uuid version 7 more appropriate for keys in high-load databaseses and distributed syste
by sargstuff 1y ago
Given schema is limited to where uuid v4 usage is relevant/appropriate.
uuid version 7 more appropriate for keys in high-load databaseses and distributed systems.
Issues if need something other than uuid_v4. aka v8,
snowflake_id bit more compact than separate uuid_v4 & timezone
json, "blob" storage, not efficent for/optimized for search/replace operations. Json blob will need to be normalized every time data cached. File system storage with uuid_v7 index less overhead.
- philmcp 1y agoFair enough, ive not used v7/v8 I stand by the rest however More pros than cons
- sargstuff 1y agoAccess/search for data within json blob is non-sequential/random, kinda defeating whole purpose of using database. Not efficent way to update json if json larger than original size aka cache coherency issues. Essentially using a database as a file system[0]. [0] : postgres fuse file system : https://github.com/petere/postgresqlfs https://github.com/petere/postgresqlfs