Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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




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

Could 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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: