explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jkcR

Settings
# exclusive inclusive rows x rows loops node
1. 3,892.005 97,213.261 ↑ 1.0 6,075,468 1

Unique (cost=2,096,805.34..2,159,005.61 rows=6,220,027 width=1,673) (actual time=92,450.243..97,213.261 rows=6,075,468 loops=1)

2. 79,464.876 93,321.256 ↓ 1.0 6,291,382 1

Sort (cost=2,096,805.34..2,112,355.41 rows=6,220,027 width=1,673) (actual time=92,450.242..93,321.256 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: quicksort Memory: 6586293kB
3. 12,311.498 13,856.380 ↓ 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=394.843..13,856.380 rows=6,291,382 loops=1)

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

5. 252.023 394.795 ↓ 1,140.2 589,469 1

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

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

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

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

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