Postgres indexes under the hood
As an IT educator, I think it's better if people understand how indexes work at a higher level.<p>Then you have something, even if you forget how an R-tree works<p>Think of them as being much like a book index. A book index is useful because it's sorted, so you find something fast.  It points to the pages the item is on. Same for a db. The table isn't usually sorted, but the index is and points to the required rows<p>If you're a book editor and the author adds, edits, or removes a section, you need to update the index<p>Want to lookup a word by it's suffix? You're gonna need to scan the whole book, or have an index of reversed words<p>Database indexes work the same way