explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3PhT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.106 18,999.174 ↑ 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,999.155..18,999.174 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,999.068 ↑ 1.0 1 1

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

4. 9,568.098 18,999.034 ↓ 0.0 0 1

Hash Join (cost=0.05..29,558.82 rows=839 width=33) (actual time=18,999.026..18,999.034 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,430.849 9,430.849 ↑ 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.025..9,430.849 rows=883,116 loops=1)

6. 0.045 0.087 ↑ 1.0 2 1

Hash (cost=0.03..0.03 rows=2 width=40) (actual time=0.078..0.087 rows=2 loops=1)

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

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