explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IqIRY

Settings
# exclusive inclusive rows x rows loops node
1. 2,155.770 106,471.999 ↑ 1.0 6,075,468 1

Unique (cost=6,625,157.84..6,687,358.11 rows=6,220,027 width=1,673) (actual time=100,631.826..106,471.999 rows=6,075,468 loops=1)

2. 90,588.276 104,316.229 ↓ 1.0 6,291,382 1

Sort (cost=6,625,157.84..6,640,707.91 rows=6,220,027 width=1,673) (actual time=100,631.823..104,316.229 rows=6,291,382 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 + ('2'::numeric * COALESCE(fa.adult_price, '0'::numeric))) + ('0'::numeric * COALESCE(fa.child_price, '0'::numeric))))::integer ELSE ((p.price_current + (2 * COALESCE(fa.adult_markup, 0))) + (0 * COALESCE(fa.child_markup, 0))) END)
  • Sort Method: external merge Disk: 4135664kB
3. 12,202.787 13,727.953 ↓ 1.0 6,291,382 1

Hash Join (cost=62,639.41..1,394,922.28 rows=6,220,027 width=1,673) (actual time=396.497..13,727.953 rows=6,291,382 loops=1)

  • Hash Cond: (p.flight_group_key = fa.flight_group_key)
4. 1,128.720 1,128.720 ↓ 3.3 7,820,154 1

Seq Scan on prices_1100 p (cost=0.00..625,612.00 rows=2,406,200 width=969) (actual time=0.004..1,128.720 rows=7,820,154 loops=1)

5. 252.731 396.446 ↓ 1,140.2 589,469 1

Hash (cost=62,632.95..62,632.95 rows=517 width=1,180) (actual time=396.446..396.446 rows=589,469 loops=1)

  • Buckets: 1048576 (originally 1024) Batches: 1 (originally 1) Memory Usage: 218217kB
6. 0.000 143.715 ↓ 1,140.2 589,469 1

Gather (cost=1,000.00..62,632.95 rows=517 width=1,180) (actual time=3.412..143.715 rows=589,469 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 162.148 162.148 ↓ 913.9 196,490 3

Parallel Seq Scan on flights_all fa (cost=0.00..61,581.25 rows=215 width=1,180) (actual time=1.103..162.148 rows=196,490 loops=3)

  • Filter: (d3pf AND (seats >= 2) AND (stay = (bedbanks_nights + 1)))
  • Rows Removed by Filter: 10379