explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EyxS : Optimization for: Optimization for: Optimization for: Optimization for: plan #3PhT; plan #8OAB; plan #ANb2; plan #7IL8

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.085 19,707.387 ↑ 1.0 1 1

Index Scan using travel_cancellation_option_ma_partner_id_site_id_country_fa_idx on travel_cancellation_option_mapping tcom (cost=29,561.06..29,569.35 rows=1 width=99) (actual time=19,707.370..19,707.387 rows=1 loops=1)

  • Index Cond: ((partner_id = '1'::text) AND (site_id = '1'::text) AND (country = 'JP'::text) AND (fare_class = 'SuperValue'::text) AND (special_airport = $0) AND ((currency)::text = 'JPY'::text) AND (price_band_1_item_count = 1) AND (price_band_1_price_start < '20000'::numeric) AND (price_band_1_price_end >= '20000'::numeric) AND (price_band_2_item_count = 1) AND (price_band_2_price_start < '10000'::numeric) AND (price_band_2_price_end >= '10000'::numeric))
  • Filter: ((allowed_airports IS NULL) OR ('{HND,OSA}'::text[] <@ allowed_airports))
2.          

Initplan (forIndex Scan)

3. 0.033 19,707.302 ↑ 1.0 1 1

Aggregate (cost=29,560.63..29,560.64 rows=1 width=1) (actual time=19,707.286..19,707.302 rows=1 loops=1)

4. 9,793.040 19,707.269 ↓ 0.0 0 1

Hash Join (cost=0.05..29,558.53 rows=839 width=33) (actual time=19,707.260..19,707.269 rows=0 loops=1)

  • Hash Cond: (sa.code = "*VALUES*".column1)
  • Join Filter: ((sa.start_day <= "*VALUES*".column2) AND (sa.start_month <= "*VALUES*".column3) AND (sa.end_day >= "*VALUES*".column2) AND (sa.end_month >= "*VALUES*".column3))
5. 9,914.136 9,914.136 ↑ 1.0 883,116 1

Seq Scan on special_airports sa (cost=0.00..24,888.16 rows=883,116 width=53) (actual time=0.054..9,914.136 rows=883,116 loops=1)

6. 0.049 0.093 ↑ 1.0 2 1

Hash (cost=0.03..0.03 rows=2 width=40) (actual time=0.085..0.093 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.044 0.044 ↑ 1.0 2 1

Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=40) (actual time=0.014..0.044 rows=2 loops=1)

Planning time : 7.434 ms
Execution time : 19,708.366 ms