explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IsYa

Settings
# exclusive inclusive rows x rows loops node
1. 11.902 1,054.350 ↓ 108.7 5,109 1

HashAggregate (cost=1,066,643.94..1,066,644.76 rows=47 width=72) (actual time=1,052.758..1,054.350 rows=5,109 loops=1)

  • Group Key: flights.departuredate, (((flights.departuredate - '364 days'::interval))::date - prep_held_multi.observation_date), json_each_text.key
2. 39.273 1,042.448 ↑ 90.5 9,033 1

Nested Loop (cost=7.37..1,054,387.44 rows=817,100 width=72) (actual time=1.719..1,042.448 rows=9,033 loops=1)

3. 73.258 524.799 ↑ 6.8 119,594 1

Nested Loop (cost=7.36..18,713.18 rows=817,100 width=40) (actual time=0.281..524.799 rows=119,594 loops=1)

4. 23.104 101.477 ↓ 4.8 38,896 1

Nested Loop Left Join (cost=7.35..2,371.18 rows=8,171 width=145) (actual time=0.115..101.477 rows=38,896 loops=1)

5. 0.241 1.333 ↓ 1.6 120 1

Nested Loop Left Join (cost=6.78..945.74 rows=76 width=8) (actual time=0.099..1.333 rows=120 loops=1)

6. 0.298 0.372 ↓ 1.6 120 1

Bitmap Heap Scan on flights (cost=6.35..302.97 rows=76 width=8) (actual time=0.087..0.372 rows=120 loops=1)

  • Recheck Cond: ((""right""(segmentname, 3) = 'HKG'::text) AND (departuredate >= '2019-08-01'::date) AND (departuredate <= '2019-08-30'::date) AND (cabin = 'Y'::text))
  • Heap Blocks: exact=79
7. 0.074 0.074 ↓ 1.6 120 1

Bitmap Index Scan on flights_destination_departuredate_cabin (cost=0.00..6.33 rows=76 width=0) (actual time=0.074..0.074 rows=120 loops=1)

  • Index Cond: ((""right""(segmentname, 3) = 'HKG'::text) AND (departuredate >= '2019-08-01'::date) AND (departuredate <= '2019-08-30'::date) AND (cabin = 'Y'::text))
8. 0.720 0.720 ↑ 1.0 1 120

Index Scan using flights_ty_ly_id on flights_ty_ly (cost=0.43..8.45 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=120)

  • Index Cond: (flights.id = id)
9. 77.040 77.040 ↓ 1.6 324 120

Index Scan using prep_held_multi_id_obs_date on prep_held_multi (cost=0.57..16.70 rows=206 width=145) (actual time=0.010..0.642 rows=324 loops=120)

  • Index Cond: (flights_ty_ly.ly_id = id)
10. 350.064 350.064 ↑ 33.3 3 38,896

Function Scan on json_each_text json_each_text_1 (cost=0.01..1.00 rows=100 width=32) (actual time=0.008..0.009 rows=3 loops=38,896)

11. 478.376 478.376 ↓ 0.0 0 119,594

Function Scan on json_each_text (cost=0.01..1.26 rows=1 width=64) (actual time=0.004..0.004 rows=0 loops=119,594)

  • Filter: (key = 'ADL-HKG'::text)
  • Rows Removed by Filter: 1
Planning time : 0.505 ms
Execution time : 1,055.335 ms