Alexander Ioffe: I ran the same query twice and Postgres disagreed with itself

Two EXPLAIN ANALYZE runs on statistically identical data produced opposite plans, 73 heap blocks against 3,449. The margin was 1.5%. Here's the mechanism, measured with ExoBench, and the index shape that takes the coin out of the planner's hand.

cloud

Sources

Alexander Ioffe: I ran the same query twice and Postgres disagreed with itself · TechNews