explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gEFl : Optimization for: plan #lMC1

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.024 0.837 ↓ 0.0 0 1

Update on oddshistory odds (cost=2.53..46.10 rows=1 width=133) (actual time=0.837..0.837 rows=0 loops=1)

2. 0.586 0.813 ↓ 3.0 3 1

Nested Loop (cost=2.53..46.10 rows=1 width=133) (actual time=0.267..0.813 rows=3 loops=1)

3. 0.003 0.203 ↓ 3.0 3 1

Nested Loop (cost=1.97..42.81 rows=1 width=44) (actual time=0.042..0.203 rows=3 loops=1)

4. 0.007 0.185 ↓ 3.0 3 1

Nested Loop (cost=1.55..37.97 rows=1 width=38) (actual time=0.035..0.185 rows=3 loops=1)

5. 0.007 0.022 ↑ 3.7 3 1

Hash Join (cost=1.14..16.20 rows=11 width=98) (actual time=0.017..0.022 rows=3 loops=1)

  • Hash Cond: (newvals.bookmakerid = book.externalid)
6. 0.008 0.008 ↑ 120.0 3 1

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

7. 0.003 0.007 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.007..0.007 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.004 0.004 ↑ 1.0 6 1

Seq Scan on bookmakers book (cost=0.00..1.06 rows=6 width=12) (actual time=0.003..0.004 rows=6 loops=1)

9. 0.156 0.156 ↑ 1.0 1 3

Index Scan using markets_un1 on markets mark (cost=0.41..1.97 rows=1 width=27) (actual time=0.013..0.052 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. 0.015 0.015 ↑ 4.0 1 3

Index Scan using matches_externalid_idx on matches mtc (cost=0.42..4.79 rows=4 width=14) (actual time=0.004..0.005 rows=1 loops=3)

  • Index Cond: (externalid = newvals.fixtureid)
11. 0.024 0.024 ↑ 1.0 1 3

Index Scan using oddshistory_matchid_idx on oddshistory odds (cost=0.56..2.79 rows=1 width=507) (actual time=0.008..0.008 rows=1 loops=3)

  • Index Cond: ((matchid = mtc.matchid) AND (bookmakerid = book.bookmakerid) AND (marketid = mark.marketid))