explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vrTD : Optimization for: Optimization for: plan #jyov; plan #Yj9t

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.048 10,360.325 ↑ 1.0 1 1

Unique (cost=18,481.03..18,481.05 rows=1 width=99) (actual time=10,360.273..10,360.325 rows=1 loops=1)

2. 0.082 10,360.277 ↓ 2.0 2 1

Sort (cost=18,481.03..18,481.04 rows=1 width=99) (actual time=10,360.252..10,360.277 rows=2 loops=1)

  • Sort Key: tcom.product_group_option_id, tcom.price_band_1_product_group_option_id, tcom.price_band_2_product_group_option_id
  • Sort Method: quicksort Memory: 25kB
3. 1,194.124 10,360.195 ↓ 2.0 2 1

Nested Loop (cost=993.05..18,481.02 rows=1 width=99) (actual time=5,273.578..10,360.195 rows=2 loops=1)

  • Join Filter: (tcom.id = sa.mapping_id)
  • Rows Removed by Join Filter: 90574
4. 2.267 2.267 ↓ 2.0 2 1

Index Scan using travel_cancellation_option_ma_partner_id_site_id_country_fa_idx on travel_cancellation_option_mapping tcom (cost=0.41..41.69 rows=1 width=132) (actual time=0.130..2.267 rows=2 loops=1)

  • Index Cond: ((partner_id = '1'::text) AND (site_id = '1'::text) AND (country = 'JP'::text) AND (fare_class = 'SuperValue'::text) 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))
5. 9,037.342 9,163.804 ↓ 2.3 45,288 2

Bitmap Heap Scan on special_airports sa (cost=992.64..18,188.86 rows=20,038 width=33) (actual time=69.224..4,581.902 rows=45,288 loops=2)

  • Recheck Cond: (('KTD'::text = code) OR ('OKA'::text = code))
  • Filter: ((1 >= start_day) AND (1 <= end_day) AND (9 >= start_month) AND (9 <= end_month))
  • Heap Blocks: exact=32114
6. 0.092 126.462 ↓ 0.0 0 2

BitmapOr (cost=992.64..992.64 rows=45,569 width=0) (actual time=63.227..63.231 rows=0 loops=2)

7. 62.404 62.404 ↑ 1.0 22,644 2

Bitmap Index Scan on special_airports_codes (cost=0.00..491.97 rows=22,873 width=0) (actual time=31.198..31.202 rows=22,644 loops=2)

  • Index Cond: ('KTD'::text = code)
8. 63.966 63.966 ↑ 1.0 22,644 2

Bitmap Index Scan on special_airports_codes (cost=0.00..490.65 rows=22,696 width=0) (actual time=31.979..31.983 rows=22,644 loops=2)

  • Index Cond: ('OKA'::text = code)
Planning time : 45.366 ms
Execution time : 10,363.475 ms