Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardSQLreading EXPLAIN ANALYZESingle-choice MCQ

In an EXPLAIN ANALYZE plan, a Nested Loop node shows its inner index-scan child as `(actual time=0.005..0.008 rows=1 loops=413000)`. A junior reads the inner node's reported cost as the total work it did. Why does multiplying is needed, and what total inner-row count did this node actually emit?

-> Nested Loop (actual rows=412998 loops=1) -> Seq Scan on a (actual rows=413000 loops=1) -> Index Scan on b (actual time=0.005..0.008 rows=1 loops=413000)