explain.depesz.com

PostgreSQL's explain analyze made readable

Result: naHj : Optimization for: plan #FUg

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.468 0.586 ↑ 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=0.28..133.31 rows=1 width=99) (actual time=0.263..0.586 rows=1 loops=1)

  • Index Cond: ((partner_id = '1'::text) AND (site_id = '1'::text) AND (country = 'JP'::text) AND ((currency)::text = 'JPY'::text) AND (price_band_1_item_count = 1) AND ('20000'::numeric >= price_band_1_price_start) AND ('20000'::numeric <= price_band_1_price_end) AND (price_band_2_item_count = 1) AND ('10000'::numeric >= price_band_2_price_start) AND ('10000'::numeric <= price_band_2_price_end))
  • Filter: (((allowed_airports IS NULL) OR ('{NRT,OKA}'::text[] <@ allowed_airports)) AND ((fare_class = 'SV21A'::text) OR (fare_class = (SubPlan 1))) AND ((SubPlan 2) = special_airport))
  • Rows Removed by Filter: 3
2.          

SubPlan (forIndex Scan)

3. 0.052 0.052 ↓ 0.0 0 4

Index Scan using fare_class_aliases_alias_idx on fare_class_aliases (cost=0.41..8.43 rows=1 width=9) (actual time=0.013..0.013 rows=0 loops=4)

  • Index Cond: ((mapping_id = tcom.id) AND (alias = 'SV21A'::text))
  • Filter: (NOT is_deleted)
4. 0.008 0.066 ↑ 1.0 1 2

Aggregate (cost=16.93..16.95 rows=1 width=1) (actual time=0.033..0.033 rows=1 loops=2)

5. 0.012 0.058 ↑ 1.0 1 2

Nested Loop (cost=0.41..16.93 rows=1 width=33) (actual time=0.028..0.029 rows=1 loops=2)

6. 0.010 0.010 ↑ 1.0 2 2

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

7. 0.036 0.036 ↓ 0.0 0 4

Index Scan using special_airports_mapping_id_code_start_day_start_month_end__idx on special_airports sa (cost=0.41..8.44 rows=1 width=53) (actual time=0.009..0.009 rows=0 loops=4)

  • Index Cond: ((tcom.id = mapping_id) AND (code = "*VALUES*".column1) AND (start_day <= "*VALUES*".column2) AND (start_month <= "*VALUES*".column3) AND (end_day >= "*VALUES*".column2) AND (end_month >= "*VALUES*".column3))