In the earlier posts of this series, we looked at practical query tuning tips and how to read and interpret query plans. A recurring theme in both was: "add an index here." But "add an index" is a bit like saying "use the right tool" — the interesting part is which one.

PostgreSQL ships with several index types, each tuned for a different kind of...