explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eayj : Optimization for: Optimization for: plan #V1Ae; plan #wQHF

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 0.215 ↓ 0.0 0 1

Subquery Scan on outcomes (cost=226.61..227.34 rows=21 width=4) (actual time=0.215..0.215 rows=0 loops=1)

  • Output: outcomes.market_id
  • Filter: outcomes.is_valid
  • Rows Removed by Filter: 1
  • Buffers: shared hit=13 read=3
  • I/O Timings: read=0.027
2.          

CTE params

3. 0.013 0.015 ↑ 100.0 1 1

ProjectSet (cost=0.00..0.52 rows=100 width=40) (actual time=0.013..0.015 rows=1 loops=1)

  • Output: unnest('{128618}'::integer[]), unnest('{1}'::integer[]), unnest('{1.75}'::numeric[])
4. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=0) (actual time=0.001..0.002 rows=1 loops=1)

5. 0.003 0.213 ↑ 42.0 1 1

Unique (cost=226.09..226.40 rows=42 width=13) (actual time=0.210..0.213 rows=1 loops=1)

  • Output: eo.market_id, ((eo.fixed_odds_web = p.fixed_odds_web)), eo.outcome_no, eo.odds_version
  • Buffers: shared hit=13 read=3
  • I/O Timings: read=0.027
6. 0.012 0.210 ↑ 3.5 12 1

Sort (cost=226.09..226.19 rows=42 width=13) (actual time=0.209..0.210 rows=12 loops=1)

  • Output: eo.market_id, ((eo.fixed_odds_web = p.fixed_odds_web)), eo.outcome_no, eo.odds_version
  • Sort Key: eo.market_id, eo.outcome_no, eo.odds_version DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=13 read=3
  • I/O Timings: read=0.027
7. 0.029 0.198 ↑ 3.5 12 1

Nested Loop (cost=0.43..224.96 rows=42 width=13) (actual time=0.119..0.198 rows=12 loops=1)

  • Output: eo.market_id, (eo.fixed_odds_web = p.fixed_odds_web), eo.outcome_no, eo.odds_version
  • Buffers: shared hit=13 read=3
  • I/O Timings: read=0.027
8. 0.019 0.019 ↑ 100.0 1 1

CTE Scan on params p (cost=0.00..2.00 rows=100 width=40) (actual time=0.016..0.019 rows=1 loops=1)

  • Output: p.market_id, p.outcome_no, p.fixed_odds_web
9. 0.150 0.150 ↓ 12.0 12 1

Index Only Scan using market_outcomes_market_id_outcome_no_odds_version_fixed_odd_idx on iddaa.market_outcomes eo (cost=0.43..2.22 rows=1 width=18) (actual time=0.094..0.150 rows=12 loops=1)

  • Output: eo.market_id, eo.outcome_no, eo.odds_version, eo.fixed_odds_web
  • Index Cond: ((eo.market_id = p.market_id) AND (eo.outcome_no = p.outcome_no))
  • Heap Fetches: 12
  • Buffers: shared hit=13 read=3
  • I/O Timings: read=0.027
Planning time : 0.625 ms
Execution time : 0.282 ms