explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mRS0

Settings
# exclusive inclusive rows x rows loops node
1. 2,887.411 71,683.876 ↓ 48.7 4,872,562 1

Unique (cost=431,924.00..432,923.57 rows=99,957 width=490) (actual time=65,236.332..71,683.876 rows=4,872,562 loops=1)

2. 61,575.568 68,796.465 ↓ 50.3 5,026,200 1

Sort (cost=431,924.00..432,173.89 rows=99,957 width=490) (actual time=65,236.329..68,796.465 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. 0.000 7,220.897 ↓ 50.3 5,026,200 1

Gather (cost=1,000.56..423,623.06 rows=99,957 width=490) (actual time=4.381..7,220.897 rows=5,026,200 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 8,618.534 8,755.642 ↓ 40.2 1,675,400 3

Nested Loop (cost=0.56..408,108.49 rows=41,649 width=490) (actual time=1.297..8,755.642 rows=1,675,400 loops=3)

5. 137.091 137.091 ↓ 155.1 197,486 3

Parallel Seq Scan on flights_all_test fa (cost=0.00..61,770.30 rows=1,273 width=330) (actual time=1.210..137.091 rows=197,486 loops=3)

  • Filter: (d3pf AND (seats >= 1) AND (stay = (bedbanks_nights + 1)))
  • Rows Removed by Filter: 10208
6. 0.017 0.017 ↑ 10.5 8 592,457

Index Scan using ix_prices_test2 on prices_1000_test p (cost=0.56..268.69 rows=84 width=278) (actual time=0.011..0.017 rows=8 loops=592,457)

  • Index Cond: (flight_group_key = fa.flight_group_key)
Planning time : 0.937 ms