explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wQHF : Optimization for: plan #V1Ae

Settings

Optimization path:

Optimization(s) for this plan:

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

Subquery Scan on outcomes (cost=269.51..270.24 rows=21 width=4) (actual time=0.133..0.133 rows=0 loops=1)

  • Output: outcomes.market_id
  • Filter: outcomes.is_valid
  • Rows Removed by Filter: 1
  • Buffers: shared hit=15
2.          

CTE params

3. 0.007 0.009 ↑ 100.0 1 1

ProjectSet (cost=0.00..0.52 rows=100 width=40) (actual time=0.007..0.009 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.002..0.002 rows=1 loops=1)

5. 0.002 0.131 ↑ 42.0 1 1

Unique (cost=268.99..269.30 rows=42 width=13) (actual time=0.128..0.131 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=15
6. 0.015 0.129 ↑ 3.5 12 1

Sort (cost=268.99..269.09 rows=42 width=13) (actual time=0.128..0.129 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=15
7. 0.014 0.114 ↑ 3.5 12 1

Nested Loop (cost=0.43..267.86 rows=42 width=13) (actual time=0.067..0.114 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=15
8. 0.013 0.013 ↑ 100.0 1 1

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

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

Index Scan using market_outcomes_market_id_outcome_no_fixed_odds_idx on iddaa.market_outcomes eo (cost=0.43..2.65 rows=1 width=18) (actual time=0.048..0.087 rows=12 loops=1)

  • Output: eo.id, eo.market_id, eo.outcome_no, eo.outcome_name, eo.outcome_result, eo.fixed_odds, eo.fixed_odds_web, eo.odds_version, eo.create_date, eo.market_table_id
  • Index Cond: ((eo.market_id = p.market_id) AND (eo.outcome_no = p.outcome_no))
  • Buffers: shared hit=15
Planning time : 0.386 ms
Execution time : 0.278 ms