3 ms·
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-ba
by K0nserv 10mo ago
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
- sgarland 10mo agoYes, and for Postgres, it also causes WAL bloat due to the high likelihood of full page writes.
- dotancohen 10mo agoCould you expand on this? I use postgres often and though I could have an LLM explain what you mean, I think I'd learn more to hear it from you. Thank you.