News for hackers. Stuff that matters.
Re:PostgreSQL and UUID as Primary Key by samokhvalov on Friday July 05, 2024 @05:02PM (#40885979)
there is also a problem of data locality and blocks present in caches (page cache, buffer pool) at any given time, in general -- UUIDv4 is losing to bigint and UUIDv7 in this area
Re:PostgreSQL and UUID as Primary Key by shi on Saturday July 06, 2024 @08:02AM (#40889894)
This is a valid point but it highly depends on the use case and larger context on whether this will be relevant or not. If you have a table where you fetch multiple rows close to each other in paginated manner this would be relevant for the performance but if you only fetch individual records by uuid, data locality wouldn’t increase the performance.