3 ms·
The Postgres documentation on btrees is absolutely stellar if you can afford some extended time to study it [1]. From there you can read the actual code or watc
by why-el 6y ago
The Postgres documentation on btrees is absolutely stellar if you can afford some extended time to study it [1]. From there you can read the actual code or watch some videos on how Postgresql indexes use them. You can even dump indexes locally to see their content! from root all the way to the leaf nodes [2] (this assuming you read and understood the above).
[1] https://github.com/postgres/postgres/tree/master/src/backend/access/nbtree https://github.com/postgres/postgres/tree/master/src/backend...
[2] https://www.postgresql.org/docs/10/pageinspect.html https://www.postgresql.org/docs/10/pageinspect.html