explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5NPV : hash

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Unique (cost=102,293.11..102,580.82 rows=57,542 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=102,293.11..102,436.96 rows=57,542 width=32) (actual rows= loops=)

  • Sort Key: (ROW(r.a, r.b, r.c, s.d))
3. 0.000 0.000 ↓ 0.0

Gather (cost=88,887.90..97,743.74 rows=57,542 width=32) (actual rows= loops=)

  • Workers Planned: 1
4. 0.000 0.000 ↓ 0.0

Merge Join (cost=87,887.90..90,989.54 rows=33,848 width=32) (actual rows= loops=)

  • Merge Cond: ((r.c = s.c) AND (r.b = s.b) AND (r.a = t.a))
5. 0.000 0.000 ↓ 0.0

Sort (cost=37,388.47..38,123.76 rows=294,118 width=12) (actual rows= loops=)

  • Sort Key: r.c, r.b, r.a
6. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on r (cost=0.00..5,644.18 rows=294,118 width=12) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Sort (cost=50,499.43..50,536.65 rows=14,890 width=28) (actual rows= loops=)

  • Sort Key: s.c, s.b, t.a
8. 0.000 0.000 ↓ 0.0

Merge Join (cost=47,086.89..49,467.40 rows=14,890 width=28) (actual rows= loops=)

  • Merge Cond: ((u.b = s.b) AND (t.c = s.c) AND (t.d = s.d))
9. 0.000 0.000 ↓ 0.0

Sort (cost=22,975.55..23,366.52 rows=156,390 width=24) (actual rows= loops=)

  • Sort Key: u.b, t.c, t.d
10. 0.000 0.000 ↓ 0.0

Merge Join (cost=3,475.54..6,273.66 rows=156,390 width=24) (actual rows= loops=)

  • Merge Cond: ((t.a = u.a) AND (t.d = u.d))
11. 0.000 0.000 ↓ 0.0

Sort (cost=1,737.77..1,787.77 rows=20,000 width=12) (actual rows= loops=)

  • Sort Key: t.a, t.d
12. 0.000 0.000 ↓ 0.0

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

13. 0.000 0.000 ↓ 0.0

Sort (cost=1,737.77..1,787.77 rows=20,000 width=12) (actual rows= loops=)

  • Sort Key: u.a, u.d
14. 0.000 0.000 ↓ 0.0

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

15. 0.000 0.000 ↓ 0.0

Materialize (cost=24,111.14..25,111.14 rows=200,000 width=12) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Sort (cost=24,111.14..24,611.14 rows=200,000 width=12) (actual rows= loops=)

  • Sort Key: s.b, s.c, s.d
17. 0.000 0.000 ↓ 0.0

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