Re:PostgreSQL Index Internals
by kbradero on Tuesday August 09, 2016 @11:22AM
(#12255173)
is there a book/documents about DB internals ? I have found some books about theory but not about an actual implementation.
[ Parent
| on HN ]
Because there are many different implementations, with different trade-offs and design decisions. Also, the implementation-specific documentation is typically kept fairly close to the code, as the docs need to be kept in sync.
So for example if you need to know how indexes in PostgreSQL work, look into the READMEs in the proper directory:
b-tree indexes: https://github.com/postgres/postgres/blob/master/src/backend...
gin: https://github.com/postgres/postgres/blob/master/src/backend...
brin: https://github.com/postgres/postgres/blob/master/src/backend...
etc. The READMEs also include links to related papers etc.
hey thanks!, tho I agree with this, I was thinking, if there are books about kernel internals there may be some about db internals.
but Thanks for your links !
This is a good summary paper on the database internals and major architectural decisions: http://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf
Re:PostgreSQL Index Internals
by dguaraglia on Tuesday August 09, 2016 @01:04PM
(#12256022)
If what you are looking is a general book (not necessarily just for Postgres) I can't recommend the "Use The Index, Luke"[1] tutorial, and the accompanying book "SQL Performance Explained" by Markus Winand, enough.
It doesn't go into a lot of relational theory, but it does provide a somewhat low-level description on how indices and database data are stored, and why you want to use different kind of indices in different scenarios.
It's useful (probably more useful for most of us than any kind of deep dive into internals, at least for a first read), but I don't remember it going that deep into implementation decisions.