TLDR Web Dev · ARTICLES & TUTORIALS
UNEXPECTED DOWNSIDES OF UUID KEYS IN POSTGRESQL
Summary from the TLDR Web Dev newsletter
UUIDs are commonly used as keys in PostgreSQL databases. However, UUID’s come with their own downsides. The most important of these downsides is a loss of temporal locality. The trouble with picking random values is that they lose any correlation between the order of inserts and the order of IDs. This can lead to a loss of performance.