explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ag9g : Optimization for: Optimization for: Optimization for: plan #vNBr; plan #kWuS; plan #fEw1

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 91,179.116 113,737.427 ↑ 60.4 8,839 1

Aggregate (cost=6,198,268.48..7,564,697.25 rows=534,283 width=102) (actual time=22,525.111..113,737.427 rows=8,839 loops=1)

  • Buffers: shared hit=14619894
2. 180.807 22,558.311 ↑ 2.2 245,994 1

Sort (cost=6,198,268.48..6,199,604.19 rows=534,283 width=18) (actual time=22,506.871..22,558.311 rows=245,994 loops=1)

  • Sort Key: mtc.leagueid, mtc.roundid, mtc.seasonid, tm.teamid
  • Sort Method: quicksort Memory: 20816kB
  • Buffers: shared hit=2568
3. 14,105.451 22,377.504 ↑ 2.2 245,994 1

Nested Loop (cost=0..6,147,438.82 rows=534,283 width=18) (actual time=0.962..22,377.504 rows=245,994 loops=1)

  • Buffers: shared hit=2562
4. 8.157 31.254 ↑ 1.0 122,997 1

Append (cost=0..4,449.13 rows=125,276 width=22) (actual time=0.021..31.254 rows=122,997 loops=1)

  • Buffers: shared hit=2550
5. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on matches mtc (cost=0..0 rows=1 width=22) (actual time=0.004..0.004 rows=0 loops=1)

6. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on matches mtc_1 (cost=0..22.3 rows=1,230 width=22) (actual time=0.001..0.001 rows=0 loops=1)

7. 23.089 23.089 ↓ 1.0 122,997 1

Seq Scan on matches mtc_2 (cost=0..3,778.15 rows=122,815 width=22) (actual time=0.014..23.089 rows=122,997 loops=1)

  • Buffers: shared hit=2550
8. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on matches mtc_3 (cost=0..22.3 rows=1,230 width=22) (actual time=0.003..0.003 rows=0 loops=1)

9. 8,240.099 8,240.799 ↑ 1.6 1,747 122,997

Materialize (cost=0..88.03 rows=2,802 width=4) (actual time=0..0.067 rows=1,747 loops=122,997)

  • Buffers: shared hit=12
10. 0.281 0.700 ↑ 1.6 1,747 1

Append (cost=0..74.02 rows=2,802 width=4) (actual time=0.015..0.7 rows=1,747 loops=1)

  • Buffers: shared hit=12
11. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on teams tm (cost=0..0 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=1)

12. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on teams tm_1 (cost=0..15.3 rows=530 width=4) (actual time=0.001..0.001 rows=0 loops=1)

13. 0.415 0.415 ↓ 1.0 1,747 1

Seq Scan on teams tm_2 (cost=0..29.41 rows=1,741 width=4) (actual time=0.011..0.415 rows=1,747 loops=1)

  • Buffers: shared hit=12
14. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on teams tm_3 (cost=0..15.3 rows=530 width=4) (actual time=0.002..0.002 rows=0 loops=1)