EXPLAIN ANALYZE measures query plan cost (rows read, plan used, time). Recall@K measures correctness. The two answer different questions: “is it fast?” and “is it right?”. Run both in CI: a query might be perfect at 50 ms using 100% of the right rows, OR perfect at 5 sec using 80% — only one is the right shipping shape.
EXPLAIN ANALYZE: outputs rows scanned, plan used, time-to-finish.
Recall@K: did the predicted K contain the labelled row?
Together: “fast and correct” is a deployable query. “Fast but wrong” or “right but 10x slower” both block ship.
EXPLAIN ANALYZE -> fast yes/no (with what plan)
Recall@K -> right yes/no (with what trade-off)
(both answer different questions about the same query)
Always evaluate query plans AND query correctness in CI; one without the other lies.