explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xgcn

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

Unique (cost=39,004.77..39,793.08 rows=102,000 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=39,004.77..39,398.93 rows=157,662 width=32) (actual rows= loops=)

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

Merge Join (cost=21,428.70..21,620.44 rows=157,662 width=32) (actual rows= loops=)

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

Sort (cost=19,690.92..19,716.31 rows=10,156 width=28) (actual rows= loops=)

  • Sort Key: u.a, u.d, s.c
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=17,910.00..19,015.04 rows=10,156 width=28) (actual rows= loops=)

  • Hash Cond: ((u.a = r.a) AND (u.b = r.b) AND (s.c = r.c))
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=5,082.00..5,922.77 rows=20,000 width=24) (actual rows= loops=)

  • Hash Cond: ((u.d = s.d) AND (u.b = s.b))
7. 0.000 0.000 ↓ 0.0

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

8. 0.000 0.000 ↓ 0.0

Hash (cost=4,782.00..4,782.00 rows=20,000 width=12) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

HashAggregate (cost=4,582.00..4,782.00 rows=20,000 width=12) (actual rows= loops=)

  • Group Key: s.d, s.b, s.c
10. 0.000 0.000 ↓ 0.0

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

11. 0.000 0.000 ↓ 0.0

Hash (cost=11,953.00..11,953.00 rows=50,000 width=12) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

HashAggregate (cost=11,453.00..11,953.00 rows=50,000 width=12) (actual rows= loops=)

  • Group Key: r.a, r.b, r.c
13. 0.000 0.000 ↓ 0.0

Seq Scan on r (cost=0.00..7,703.00 rows=500,000 width=12) (actual rows= loops=)

14. 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, t.c
15. 0.000 0.000 ↓ 0.0

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