logoalt Hacker News

K0nservyesterday at 11:55 AM1 replyview on HN

Isn't part of this that inserting into a btree index is more performant when the keys are increasing rather than being random? A random id will cause more re-balancing operations than always inserting at the end. Increasing ids are also more cache friendly


Replies

sgarlandyesterday at 2:15 PM

Yes, and for Postgres, it also causes WAL bloat due to the high likelihood of full page writes.

show 1 reply