explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WwPk

Settings
# exclusive inclusive rows x rows loops node
1. 2,956.151 22,396.950 ↑ 2.3 3 1

GroupAggregate (cost=426,385.58..426,385.74 rows=7 width=24) (actual time=18,481.182..22,396.950 rows=3 loops=1)

  • Group Key: (CASE WHEN (vs.deal_cd IS NOT NULL) THEN 1 ELSE 0 END), (CASE WHEN (dd.source_deal_id IS NOT NULL) THEN 1 ELSE 0 END)
2. 3,993.641 19,440.799 ↓ 1,071,103.9 7,497,727 1

Sort (cost=426,385.58..426,385.60 rows=7 width=12) (actual time=18,448.243..19,440.799 rows=7,497,727 loops=1)

  • Sort Key: (CASE WHEN (vs.deal_cd IS NOT NULL) THEN 1 ELSE 0 END), (CASE WHEN (dd.source_deal_id IS NOT NULL) THEN 1 ELSE 0 END)
  • Sort Method: external merge Disk: 161,496kB
3. 472.714 15,447.158 ↓ 1,071,103.9 7,497,727 1

Gather (cost=12,293.97..426,385.48 rows=7 width=12) (actual time=91.942..15,447.158 rows=7,497,727 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 281.073 14,974.444 ↓ 833,080.7 2,499,242 3 / 3

Nested Loop Left Join (cost=11,293.97..425,384.78 rows=3 width=12) (actual time=76.059..14,974.444 rows=2,499,242 loops=3)

5. 1,529.738 2,197.159 ↓ 833,080.7 2,499,242 3 / 3

Hash Join (cost=11,293.69..425,383.87 rows=3 width=17) (actual time=76.015..2,197.159 rows=2,499,242 loops=3)

  • Hash Cond: ((vs.bias_number = bo.bias_number) AND ((vs.bias_entry_date)::text = (bo.bias_entry_date)::text) AND ((vs.network_cd)::text = (bo.network_cd)::text))
6. 591.826 591.826 ↑ 1.2 2,499,242 3 / 3

Parallel Seq Scan on vw_spot vs (cost=0.00..322,870.66 rows=3,122,266 width=41) (actual time=0.131..591.826 rows=2,499,242 loops=3)

7. 49.136 75.595 ↑ 1.0 176,962 3 / 3

Hash (cost=6,986.85..6,986.85 rows=176,962 width=28) (actual time=75.595..75.595 rows=176,962 loops=3)

  • Buckets: 65,536 Batches: 4 Memory Usage: 3,123kB
8. 26.459 26.459 ↑ 1.0 176,962 3 / 3

Index Only Scan using idx_lh_bs_order_join on booked_order bo (cost=0.42..6,986.85 rows=176,962 width=28) (actual time=0.021..26.459 rows=176,962 loops=3)

  • Heap Fetches: 0
9. 12,496.212 12,496.212 ↑ 1.0 1 7,497,727 / 3

Index Only Scan using idx_dl_dlid on dim_deal dd (cost=0.29..0.31 rows=1 width=11) (actual time=0.005..0.005 rows=1 loops=7,497,727)

  • Index Cond: (source_deal_id = (vs.deal_cd)::text)
  • Heap Fetches: 2,166,290
Planning time : 1.679 ms
Execution time : 22,422.862 ms