A comprehensive guide to PostgreSQL B-Tree indexes covering how they store data on disk, navigate through internal nodes, and speed up queries. Explores practical examples with a 90-million record database, demonstrating index scans, bitmap scans, covering indexes, and the INCLUDE clause. Shows how indexes can sometimes hurt performance when the query optimizer makes suboptimal choices, and explains concepts like heap fetches, visibility tables, and the difference between index scans and index-only scans.
Table of contents
Setting some baselinesIndexesTaking an index for a spinRe-visiting our titles sortMore fun with indexesCovering IndexesA variation on the themePay attention to your SELECT clausesWrapping upSort: