Insert performance could be even better, iirc for BTree Indexes monotonic increasing values are better than random ones, but feel free to correct me on that ;)
Insert performance could be even better, iirc for BTree Indexes monotonic increasing values are better than random ones, but feel free to correct me on that ;)
UUIDv7 support unfortunately didn't make it to Postgres 17, since the RFC wasn't completely finalized yet by the time of feature freeze (April 8), see discussion on pgsql-hackers:
https://www.postgresql.org/message-id/flat/ZhzFQxU0t0xk9mA_%...
So I guess we'll unfortunately have to rely on extensions or client-side generation for the time being, until Postgres 18.
Using a monotonically increasing PK would cause pages in the index to be allocated and filled sequentially, increasing throughput.
Using random UUIDs would lead to page-splitting and partially-filled pages everywhere, negatively impacting performance and size-on-disk.
As with all databases, measure before you cut.