explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 90,190.945 111,610.207 ↑ 60.4 8,839 1

Aggregate (cost=6,198,268.48..7,564,697.25 rows=534,283 width=102) (actual time=21,376.702..111,610.207 rows=8,839 loops=1)

  • Buffers: shared hit=14619894
2. 180.522 21,419.262 ↑ 2.2 245,994 1

Sort (cost=6,198,268.48..6,199,604.19 rows=534,283 width=18) (actual time=21,362.751..21,419.262 rows=245,994 loops=1)

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

Nested Loop (cost=0..6,147,438.82 rows=534,283 width=18) (actual time=0.48..21,238.74 rows=245,994 loops=1)

  • Buffers: shared hit=2562
4. 8.034 35.288 ↑ 1.0 122,997 1

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

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

Seq Scan on matches mtc (cost=0..0 rows=1 width=22) (actual time=0.002..0.002 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. 27.248 27.248 ↓ 1.0 122,997 1

Seq Scan on matches mtc_2 (cost=0..3,778.15 rows=122,815 width=22) (actual time=0.008..27.248 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. 7,133.470 7,133.826 ↑ 1.6 1,747 122,997

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

  • Buffers: shared hit=12
10. 0.139 0.356 ↑ 1.6 1,747 1

Append (cost=0..74.02 rows=2,802 width=4) (actual time=0.008..0.356 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.214 0.214 ↓ 1.0 1,747 1

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

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

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