explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wGPh

Settings
# exclusive inclusive rows x rows loops node
1. 2,181.280 106,784.568 ↑ 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=98,515.866..106,784.568 rows=6,075,468 loops=1)

2. 90,459.742 104,603.288 ↓ 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=98,515.864..104,603.288 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,578.065 14,143.546 ↓ 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=392.056..14,143.546 rows=6,291,382 loops=1)

  • Hash Cond: (p.flight_group_key = fa.flight_group_key)
4. 1,173.476 1,173.476 ↓ 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.003..1,173.476 rows=7,820,154 loops=1)

5. 226.616 392.005 ↓ 1,140.2 589,469 1

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

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

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

  • Workers Planned: 2
  • Workers Launched: 2
7. 161.653 161.653 ↓ 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.106..161.653 rows=196,490 loops=3)

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