explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Jgd1 : hash index

Settings
# exclusive inclusive rows x rows loops node
1. 177.266 6,082.147 ↑ 6.2 9,740 1

Unique (cost=102,615.62..102,917.67 rows=60,409 width=32) (actual time=5,658.933..6,082.147 rows=9,740 loops=1)

2. 1,773.081 5,904.881 ↓ 2.0 119,957 1

Sort (cost=102,615.62..102,766.65 rows=60,409 width=32) (actual time=5,658.931..5,904.881 rows=119,957 loops=1)

  • Sort Key: (ROW(r.a, r.b, r.c, s.d))
  • Sort Method: external merge Disk: 5528kB
3. 447.509 4,131.800 ↓ 2.0 119,957 1

Gather (cost=88,669.40..97,818.40 rows=60,409 width=32) (actual time=3,831.695..4,131.800 rows=119,957 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
4. 97.560 3,684.291 ↓ 1.7 59,978 2 / 2

Merge Join (cost=87,669.40..90,777.50 rows=35,535 width=32) (actual time=3,490.387..3,684.291 rows=59,978 loops=2)

  • Merge Cond: ((r.b = s.b) AND (r.c = s.c) AND (r.a = t.a))
5. 1,855.186 1,958.626 ↑ 2.9 102,602 2 / 2

Sort (cost=37,388.47..38,123.76 rows=294,118 width=12) (actual time=1,874.481..1,958.626 rows=102,602 loops=2)

  • Sort Key: r.b, r.c, r.a
  • Sort Method: external merge Disk: 4984kB
  • Worker 0: Sort Method: external merge Disk: 5824kB
6. 103.440 103.440 ↑ 1.2 250,000 2 / 2

Parallel Seq Scan on r (cost=0.00..5,644.18 rows=294,118 width=12) (actual time=0.029..103.440 rows=250,000 loops=2)

7. 70.419 1,628.105 ↓ 4.2 64,372 2 / 2

Sort (cost=50,280.91..50,319.36 rows=15,380 width=28) (actual time=1,615.812..1,628.105 rows=64,372 loops=2)

  • Sort Key: s.b, s.c, t.a
  • Sort Method: quicksort Memory: 3150kB
  • Worker 0: Sort Method: quicksort Memory: 3150kB
8. 140.384 1,557.686 ↓ 2.0 30,480 2 / 2

Merge Join (cost=46,850.99..49,211.33 rows=15,380 width=28) (actual time=1,275.269..1,557.686 rows=30,480 loops=2)

  • Merge Cond: ((u.b = s.b) AND (t.c = s.c) AND (t.d = s.d))
9. 533.926 786.195 ↑ 1.0 154,446 2 / 2

Sort (cost=22,739.65..23,126.19 rows=154,615 width=24) (actual time=684.630..786.195 rows=154,446 loops=2)

  • Sort Key: u.b, t.c, t.d
  • Sort Method: external merge Disk: 5144kB
  • Worker 0: Sort Method: external merge Disk: 5144kB
10. 110.110 252.269 ↑ 1.0 154,446 2 / 2

Merge Join (cost=3,475.54..6,242.14 rows=154,615 width=24) (actual time=104.120..252.269 rows=154,446 loops=2)

  • Merge Cond: ((t.d = u.d) AND (t.a = u.a))
11. 37.336 54.619 ↑ 2.5 7,890 2 / 2

Sort (cost=1,737.77..1,787.77 rows=20,000 width=12) (actual time=52.636..54.619 rows=7,890 loops=2)

  • Sort Key: t.d, t.a
  • Sort Method: quicksort Memory: 1706kB
  • Worker 0: Sort Method: quicksort Memory: 1706kB
12. 17.283 17.283 ↑ 1.0 20,000 2 / 2

Seq Scan on t (cost=0.00..309.00 rows=20,000 width=12) (actual time=0.070..17.283 rows=20,000 loops=2)

13. 81.922 87.540 ↓ 7.7 154,452 2 / 2

Sort (cost=1,737.77..1,787.77 rows=20,000 width=12) (actual time=51.459..87.540 rows=154,452 loops=2)

  • Sort Key: u.d, u.a
  • Sort Method: quicksort Memory: 1706kB
  • Worker 0: Sort Method: quicksort Memory: 1706kB
14. 5.618 5.618 ↑ 1.0 20,000 2 / 2

Seq Scan on u (cost=0.00..309.00 rows=20,000 width=12) (actual time=0.062..5.618 rows=20,000 loops=2)

15. 10.509 631.107 ↑ 3.0 66,773 2 / 2

Materialize (cost=24,111.14..25,111.14 rows=200,000 width=12) (actual time=590.563..631.107 rows=66,773 loops=2)

16. 539.382 620.598 ↑ 5.0 40,250 2 / 2

Sort (cost=24,111.14..24,611.14 rows=200,000 width=12) (actual time=590.544..620.598 rows=40,250 loops=2)

  • Sort Key: s.b, s.c, s.d
  • Sort Method: external merge Disk: 4320kB
  • Worker 0: Sort Method: external merge Disk: 4320kB
17. 81.216 81.216 ↑ 1.0 200,000 2 / 2

Seq Scan on s (cost=0.00..3,082.00 rows=200,000 width=12) (actual time=6.075..81.216 rows=200,000 loops=2)

Planning time : 2.563 ms
Execution time : 6,102.920 ms