explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iqY6

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

Unique (cost=153,411.35..153,426.95 rows=3,120 width=32) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=153,411.35..153,419.15 rows=3,120 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=152,916.84..153,230.28 rows=3,120 width=32) (actual rows= loops=)

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

Sort (cost=151,179.06..151,229.06 rows=20,000 width=24) (actual rows= loops=)

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

Merge Join (cost=145,482.26..149,750.29 rows=20,000 width=24) (actual rows= loops=)

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

Sort (cost=143,744.48..143,869.48 rows=50,000 width=20) (actual rows= loops=)

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

Unique (cost=134,842.07..139,842.07 rows=50,000 width=20) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Sort (cost=134,842.07..136,092.07 rows=500,000 width=20) (actual rows= loops=)

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

Merge Join (cost=68,442.14..77,258.15 rows=500,000 width=20) (actual rows= loops=)

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

Sort (cost=63,578.92..64,828.92 rows=500,000 width=12) (actual rows= loops=)

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

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

12. 0.000 0.000 ↓ 0.0

Sort (cost=4,863.21..4,888.72 rows=10,201 width=8) (actual rows= loops=)

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

HashAggregate (cost=4,082.00..4,184.01 rows=10,201 width=8) (actual rows= loops=)

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

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

15. 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.b
16. 0.000 0.000 ↓ 0.0

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

17. 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
18. 0.000 0.000 ↓ 0.0

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