explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.135 0.474 ↑ 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=19,789.40..19,797.69 rows=1 width=99) (actual time=0.453..0.474 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 = $3) 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.039 0.339 ↑ 1.0 1 1

Aggregate (cost=19,788.97..19,788.98 rows=1 width=1) (actual time=0.318..0.339 rows=1 loops=1)

4. 0.063 0.300 ↓ 0.0 0 1

Nested Loop (cost=8,439.63..19,786.87 rows=839 width=33) (actual time=0.291..0.300 rows=0 loops=1)

5. 0.053 0.053 ↑ 1.0 2 1

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

6. 0.046 0.184 ↓ 0.0 0 2

Bitmap Heap Scan on special_airports sa (cost=8,439.63..9,889.23 rows=419 width=53) (actual time=0.087..0.092 rows=0 loops=2)

  • Recheck Cond: ((code = "*VALUES*".column1) AND (start_day <= "*VALUES*".column2) AND (start_month <= "*VALUES*".column3) AND (end_day >= "*VALUES*".column2) AND (end_month >= "*VALUES*".column3))
7. 0.042 0.138 ↓ 0.0 0 2

BitmapAnd (cost=8,439.63..8,439.63 rows=419 width=0) (actual time=0.064..0.069 rows=0 loops=2)

8. 0.096 0.096 ↓ 0.0 0 2

Bitmap Index Scan on special_airports_codes (cost=0.00..617.17 rows=33,966 width=0) (actual time=0.043..0.048 rows=0 loops=2)

  • Index Cond: (code = "*VALUES*".column1)
9. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on special_airports_dates (cost=0.00..7,822.01 rows=10,903 width=0) (never executed)

  • Index Cond: ((start_day <= "*VALUES*".column2) AND (start_month <= "*VALUES*".column3) AND (end_day >= "*VALUES*".column2) AND (end_month >= "*VALUES*".column3))
Planning time : 2.953 ms
Execution time : 0.871 ms