explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BdEb

Settings
# exclusive inclusive rows x rows loops node
1. 2,903.646 76,582.033 ↓ 46.9 4,872,562 1

Unique (cost=688,635.45..689,674.03 rows=103,858 width=490) (actual time=70,062.567..76,582.033 rows=4,872,562 loops=1)

2. 51,195.708 73,678.387 ↓ 48.4 5,026,200 1

Sort (cost=688,635.45..688,895.10 rows=103,858 width=490) (actual time=70,062.562..73,678.387 rows=5,026,200 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))) + ('0'::numeric * COALESCE(fa.child_price, '0'::numeric))))::integer ELSE ((p.price_current + (1 * COALESCE(fa.adult_markup, 0))) + (0 * COALESCE(fa.child_markup, 0))) END)
  • Sort Method: external merge Disk: 3114992kB
3. 13,325.465 22,482.679 ↓ 48.4 5,026,200 1

Hash Join (cost=597,302.98..679,981.87 rows=103,858 width=490) (actual time=8,812.425..22,482.679 rows=5,026,200 loops=1)

  • Hash Cond: (fa.flight_group_key = p.flight_group_key)
4. 387.861 387.861 ↓ 193.7 592,457 1

Seq Scan on flights_all fa (cost=0.00..68,222.77 rows=3,059 width=330) (actual time=4.263..387.861 rows=592,457 loops=1)

  • Filter: (d3pf AND (seats >= 1) AND (stay = (bedbanks_nights + 1)))
  • Rows Removed by Filter: 30624
5. 4,392.881 8,769.353 ↑ 1.0 6,007,688 1

Hash (cost=522,206.88..522,206.88 rows=6,007,688 width=278) (actual time=8,769.353..8,769.353 rows=6,007,688 loops=1)

  • Buckets: 8388608 Batches: 1 Memory Usage: 1930217kB
6. 4,376.472 4,376.472 ↑ 1.0 6,007,688 1

Seq Scan on prices_1000 p (cost=0.00..522,206.88 rows=6,007,688 width=278) (actual time=0.006..4,376.472 rows=6,007,688 loops=1)