explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NAJp

Settings
# exclusive inclusive rows x rows loops node
1. 36.694 2,990.673 ↑ 79.9 10,000 1

Sort (cost=573,943.44..575,941.44 rows=799,201 width=140) (actual time=2,988.203..2,990.673 rows=10,000 loops=1)

  • Sort Key: r.r_name, (max(ps.ps_supplycost))
  • Sort Method: external merge Disk: 760kB
2. 230.994 2,953.979 ↑ 79.9 10,000 1

GroupAggregate (cost=305,511.96..323,493.98 rows=799,201 width=140) (actual time=2,302.155..2,953.979 rows=10,000 loops=1)

3. 1,993.414 2,722.985 ↓ 1.0 800,000 1

Sort (cost=305,511.96..307,509.96 rows=799,201 width=140) (actual time=2,302.081..2,722.985 rows=800,000 loops=1)

  • Sort Key: s.s_suppkey, s.s_name, r.r_name
  • Sort Method: external merge Disk: 57088kB
4. 507.552 729.571 ↓ 1.0 800,000 1

Hash Join (cost=818.49..55,062.50 rows=799,201 width=140) (actual time=12.508..729.571 rows=800,000 loops=1)

  • Hash Cond: (ps.ps_suppkey = s.s_suppkey)
5. 209.634 209.634 ↑ 1.0 800,000 1

Seq Scan on partsupp ps (cost=0.00..26,242.00 rows=800,000 width=14) (actual time=0.008..209.634 rows=800,000 loops=1)

6. 5.620 12.385 ↑ 1.0 10,000 1

Hash (cost=497.49..497.49 rows=10,000 width=134) (actual time=12.385..12.385 rows=10,000 loops=1)

  • Buckets: 1024 Batches: 2 Memory Usage: 438kB
7. 4.983 6.765 ↑ 1.0 10,000 1

Hash Join (cost=29.99..497.49 rows=10,000 width=134) (actual time=0.062..6.765 rows=10,000 loops=1)

  • Hash Cond: (s.s_nationkey = n.n_nationkey)
8. 1.730 1.730 ↑ 1.0 10,000 1

Seq Scan on supplier s (cost=0.00..330.00 rows=10,000 width=38) (actual time=0.003..1.730 rows=10,000 loops=1)

9. 0.007 0.052 ↑ 6.8 25 1

Hash (cost=27.86..27.86 rows=170 width=108) (actual time=0.052..0.052 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
10. 0.024 0.045 ↑ 6.8 25 1

Hash Join (cost=13.82..27.86 rows=170 width=108) (actual time=0.030..0.045 rows=25 loops=1)

  • Hash Cond: (r.r_regionkey = n.n_regionkey)
11. 0.002 0.002 ↑ 34.0 5 1

Seq Scan on region r (cost=0.00..11.70 rows=170 width=108) (actual time=0.002..0.002 rows=5 loops=1)

12. 0.011 0.019 ↑ 6.8 25 1

Hash (cost=11.70..11.70 rows=170 width=12) (actual time=0.019..0.019 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
13. 0.008 0.008 ↑ 6.8 25 1

Seq Scan on nation n (cost=0.00..11.70 rows=170 width=12) (actual time=0.003..0.008 rows=25 loops=1)