explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8OAB : Optimization for: plan #3PhT

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.106 18,695.559 ↑ 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.34..29,569.63 rows=1 width=99) (actual time=18,695.541..18,695.559 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.034 18,695.453 ↑ 1.0 1 1

Aggregate (cost=29,560.91..29,560.93 rows=1 width=1) (actual time=18,695.437..18,695.453 rows=1 loops=1)

4. 9,345.313 18,695.419 ↓ 0.0 0 1

Hash Join (cost=0.05..29,558.82 rows=839 width=33) (actual time=18,695.411..18,695.419 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,350.002 9,350.002 ↑ 1.0 883,116 1

Seq Scan on special_airports sa (cost=0.00..24,888.35 rows=883,135 width=53) (actual time=0.036..9,350.002 rows=883,116 loops=1)

6. 0.055 0.104 ↑ 1.0 2 1

Hash (cost=0.03..0.03 rows=2 width=40) (actual time=0.096..0.104 rows=2 loops=1)

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

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