Index Searches: How Many Times the Engine Descended the Index (PostgreSQL 18)
PostgreSQL 18 added a line to index nodes in EXPLAIN: Index Searches: N, the number of separate descents from the root of the B-tree that the step performed. One search means a single clean range lookup; hundreds or thousands mean the engine restarted the search over and over, which happens with = ANY(array) lists, skip scans over a multi-column index, and repeated lookups inside a loop. It turns a previously invisible cost into a number you can read straight off the plan.
Questions this Concept answers
Why is a high index search count worth noticing?
J
jeremy
Text
How to Use Skip Scans in PostgreSQL 18
PostgreSQL 18 prints a new line on index nodes in EXPLAIN: Index Searches: N. It counts how many separate times the engine started at the top of the index and worked its way down during that step. On…