explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8fr1

Settings
# exclusive inclusive rows x rows loops node
1. 157.617 6,922.209 ↑ 1.2 429,214 1

Unique (cost=617,430.28..622,779.56 rows=534,928 width=1,673) (actual time=5,840.228..6,922.209 rows=429,214 loops=1)

2. 4,626.814 6,764.592 ↑ 1.2 437,975 1

Sort (cost=617,430.28..618,767.60 rows=534,928 width=1,673) (actual time=5,840.227..6,764.592 rows=437,975 loops=1)

  • Sort Key: fa.dynamic_flight_group_key, p.ap_id, p.room_group, (CASE WHEN (fa.markup_type = 'PREMIUM'::text) THEN ((((p.price_current)::numeric + ('1'::numeric * COALESCE(fa.adult_price, '0'::numeric))) + ('4'::numeric * COALESCE(fa.child_price, '0'::numeric))))::integer ELSE ((p.price_current + (1 * COALESCE(fa.adult_markup, 0))) + (4 * COALESCE(fa.child_markup, 0))) END)
  • Sort Method: external merge Disk: 286280kB
3. 1,656.688 2,137.778 ↑ 1.2 437,975 1

Hash Join (cost=62,642.86..177,089.60 rows=534,928 width=1,673) (actual time=380.582..2,137.778 rows=437,975 loops=1)

  • Hash Cond: (p.flight_group_key = fa.flight_group_key)
4. 100.641 100.641 ↓ 3.2 671,236 1

Seq Scan on prices_1040 p (cost=0.00..53,699.36 rows=206,536 width=969) (actual time=0.006..100.641 rows=671,236 loops=1)

5. 261.383 380.449 ↓ 879.6 455,651 1

Hash (cost=62,636.38..62,636.38 rows=518 width=1,180) (actual time=380.448..380.449 rows=455,651 loops=1)

  • Buckets: 131072 (originally 1024) Batches: 8 (originally 1) Memory Usage: 38977kB
6. 0.000 119.066 ↓ 879.6 455,651 1

Gather (cost=1,000.00..62,636.38 rows=518 width=1,180) (actual time=3.463..119.066 rows=455,651 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 143.230 143.230 ↓ 703.2 151,884 3

Parallel Seq Scan on flights_all fa (cost=0.00..61,584.58 rows=216 width=1,180) (actual time=1.101..143.230 rows=151,884 loops=3)

  • Filter: (d3pf AND (seats >= 5) AND (stay = (bedbanks_nights + 1)))
  • Rows Removed by Filter: 54985
Planning time : 0.269 ms