explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uevq

Settings
# exclusive inclusive rows x rows loops node
1. 2,264.375 108,249.633 ↑ 1.0 6,075,468 1

Unique (cost=11,153,510.34..11,215,710.61 rows=6,220,027 width=1,673) (actual time=93,050.504..108,249.633 rows=6,075,468 loops=1)

2. 71,980.650 105,985.258 ↓ 1.0 6,291,382 1

Sort (cost=11,153,510.34..11,169,060.41 rows=6,220,027 width=1,673) (actual time=93,050.503..105,985.258 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: 4136184kB
3. 20,036.075 34,004.608 ↓ 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=439.999..34,004.608 rows=6,291,382 loops=1)

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

5. 322.326 438.982 ↓ 1,140.2 589,469 1

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

  • Buckets: 131072 (originally 1024) Batches: 8 (originally 1) Memory Usage: 38977kB
6. 0.000 116.656 ↓ 1,140.2 589,469 1

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

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

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