explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iMFs

Settings
# exclusive inclusive rows x rows loops node
1. 4.606 14.480 ↑ 4.0 50 1

HashAggregate (cost=654.87..657.37 rows=200 width=158) (actual time=14.465..14.480 rows=50 loops=1)

  • Group Key: st.state_name
2. 1.841 9.874 ↑ 1.0 10,000 1

Hash Join (cost=313.15..529.87 rows=10,000 width=154) (actual time=3.712..9.874 rows=10,000 loops=1)

  • Hash Cond: (c.state_id = st.state_id)
3. 2.895 7.982 ↑ 1.0 10,000 1

Hash Join (cost=291.00..481.26 rows=10,000 width=40) (actual time=3.633..7.982 rows=10,000 loops=1)

  • Hash Cond: (s.customer_id = c.customer_id)
4. 1.566 1.566 ↑ 1.0 10,000 1

Seq Scan on sale s (cost=0.00..164.00 rows=10,000 width=40) (actual time=0.019..1.566 rows=10,000 loops=1)

5. 1.598 3.521 ↑ 1.0 10,000 1

Hash (cost=166.00..166.00 rows=10,000 width=8) (actual time=3.521..3.521 rows=10,000 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 519kB
6. 1.923 1.923 ↑ 1.0 10,000 1

Seq Scan on customer c (cost=0.00..166.00 rows=10,000 width=8) (actual time=0.012..1.923 rows=10,000 loops=1)

7. 0.019 0.051 ↑ 10.8 50 1

Hash (cost=15.40..15.40 rows=540 width=122) (actual time=0.051..0.051 rows=50 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.032 0.032 ↑ 10.8 50 1

Seq Scan on state st (cost=0.00..15.40 rows=540 width=122) (actual time=0.025..0.032 rows=50 loops=1)

Planning time : 13.575 ms
Execution time : 14.715 ms