explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lMC1

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.048 1,233.587 ↓ 0.0 0 1

Update on oddshistory odds (cost=1.53..6,746.27 rows=1 width=133) (actual time=1,233.587..1,233.587 rows=0 loops=1)

2. 153.353 1,233.539 ↓ 3.0 3 1

Nested Loop (cost=1.53..6,746.27 rows=1 width=133) (actual time=373.795..1,233.539 rows=3 loops=1)

  • Join Filter: (newvals.fixtureid = mtc.externalid)
  • Rows Removed by Join Filter: 224260
3. 36.335 407.397 ↓ 224,263.0 224,263 1

Nested Loop (cost=1.11..6,745.31 rows=1 width=541) (actual time=0.055..407.397 rows=224,263 loops=1)

4. 0.008 0.235 ↓ 3.0 3 1

Nested Loop (cost=0.54..72.20 rows=1 width=38) (actual time=0.040..0.235 rows=3 loops=1)

5. 0.011 0.032 ↑ 3.7 3 1

Nested Loop (cost=0.13..50.42 rows=11 width=98) (actual time=0.021..0.032 rows=3 loops=1)

  • Join Filter: (newvals.bookmakerid = book.externalid)
  • Rows Removed by Join Filter: 15
6. 0.009 0.009 ↑ 1.0 6 1

Index Scan using bookmakers_pkey on bookmakers book (cost=0.13..3.52 rows=6 width=12) (actual time=0.005..0.009 rows=6 loops=1)

7. 0.005 0.012 ↑ 120.0 3 6

Materialize (cost=0.00..15.40 rows=360 width=94) (actual time=0.001..0.002 rows=3 loops=6)

8. 0.007 0.007 ↑ 120.0 3 1

Seq Scan on odds newvals (cost=0.00..13.60 rows=360 width=94) (actual time=0.006..0.007 rows=3 loops=1)

9. 0.195 0.195 ↑ 1.0 1 3

Index Scan using markets_un1 on markets mark (cost=0.41..1.97 rows=1 width=27) (actual time=0.017..0.065 rows=1 loops=3)

  • Index Cond: (((name)::text = newvals.market) AND ((line)::text = newvals.marketline))
  • Filter: (newvals.markettypeid = externalid)
  • Rows Removed by Filter: 25
10. 370.827 370.827 ↓ 11.8 74,754 3

Index Scan using oddshistory_pkey on oddshistory odds (cost=0.56..6,609.49 rows=6,362 width=507) (actual time=0.013..123.609 rows=74,754 loops=3)

  • Index Cond: ((bookmakerid = book.bookmakerid) AND (marketid = mark.marketid))
11. 672.789 672.789 ↑ 1.0 1 224,263

Index Scan using matches_pkey on matches mtc (cost=0.42..0.44 rows=1 width=14) (actual time=0.003..0.003 rows=1 loops=224,263)

  • Index Cond: (matchid = odds.matchid)