explain.depesz.com

PostgreSQL's explain analyze made readable

Result: J7W4

Settings
# exclusive inclusive rows x rows loops node
1. 0.312 18.098 ↑ 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=985.07..1,076.04 rows=1 width=99) (actual time=17.880..18.098 rows=1 loops=1)

  • Index Cond: ((partner_id = '1'::text) AND (site_id = '1'::text) AND (country = 'JP'::text) AND ($1 = special_airport) 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))))
  • Rows Removed by Filter: 1
2.          

Initplan (forIndex Scan)

3. 0.012 17.760 ↑ 1.0 1 1

Aggregate (cost=984.78..984.79 rows=1 width=1) (actual time=17.760..17.760 rows=1 loops=1)

4. 0.003 17.748 ↓ 0.0 0 1

Nested Loop (cost=0.00..984.78 rows=1 width=33) (actual time=17.748..17.748 rows=0 loops=1)

  • 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) AND ("*VALUES*".column1 = sa.code))
5. 17.745 17.745 ↓ 0.0 0 1

Seq Scan on special_airports sa (cost=0.00..976.80 rows=159 width=53) (actual time=17.745..17.745 rows=0 loops=1)

  • Filter: ((NOT is_deleted) AND (id = mapping_id))
  • Rows Removed by Filter: 31824
6. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..0.04 rows=2 width=40) (never executed)

7. 0.000 0.000 ↓ 0.0 0

Values Scan on "*VALUES*" (cost=0.00..0.03 rows=2 width=40) (never executed)

8.          

SubPlan (forIndex Scan)

9. 0.026 0.026 ↓ 0.0 0 2

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=2)

  • Index Cond: ((mapping_id = tcom.id) AND (alias = 'SV21A'::text))
  • Filter: (NOT is_deleted)