explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GuCw

Settings
# exclusive inclusive rows x rows loops node
1. 242.086 6,849.983 ↑ 4.1 429,214 1

Unique (cost=498,607.01..515,992.02 rows=1,738,501 width=1,673) (actual time=6,554.765..6,849.983 rows=429,214 loops=1)

2. 5,206.493 6,607.897 ↑ 4.0 437,975 1

Sort (cost=498,607.01..502,953.26 rows=1,738,501 width=1,673) (actual time=6,554.764..6,607.897 rows=437,975 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))) + ('4'::numeric * COALESCE(fa.child_price, '0'::numeric))))::integer ELSE ((p.price_current + (1 * COALESCE(fa.adult_markup, 0))) + (4 * COALESCE(fa.child_markup, 0))) END)
  • Sort Method: quicksort Memory: 457107kB
3. 977.216 1,401.404 ↑ 4.0 437,975 1

Hash Join (cost=62,642.86..318,416.49 rows=1,738,501 width=1,673) (actual time=323.622..1,401.404 rows=437,975 loops=1)

  • Hash Cond: (p.flight_group_key = fa.flight_group_key)
4. 100.603 100.603 ↑ 1.0 671,236 1

Seq Scan on prices_1040 p (cost=0.00..58,346.36 rows=671,236 width=969) (actual time=0.007..100.603 rows=671,236 loops=1)

5. 180.523 323.585 ↓ 879.6 455,651 1

Hash (cost=62,636.38..62,636.38 rows=518 width=1,180) (actual time=323.584..323.585 rows=455,651 loops=1)

  • Buckets: 524288 (originally 1024) Batches: 1 (originally 1) Memory Usage: 165860kB
6. 0.290 143.062 ↓ 879.6 455,651 1

Gather (cost=1,000.00..62,636.38 rows=518 width=1,180) (actual time=4.323..143.062 rows=455,651 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 142.772 142.772 ↓ 703.2 151,884 3

Parallel Seq Scan on flights_all fa (cost=0.00..61,584.58 rows=216 width=1,180) (actual time=1.631..142.772 rows=151,884 loops=3)

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