# Result: 0PmD : Optimization for: plan #5L4m

Settings

### Optimization path:

# exclusive inclusive rows x rows loops node
1. 12,572.988 18,189.972 ↓ 36.4 7,418,382 1

Gather (cost=25,182.50..291,146.69 rows=203,749 width=2,452) (actual time=191.982..18,189.972 rows=7,418,382 loops=1)

• Workers Planned: 2
• Workers Launched: 2
2. 1,462.338 5,616.984 ↓ 29.1 2,472,794 3 / 3

(cost=24,182.50..269,771.79 rows=84,895 width=2,452) (actual time=195.192..5,616.984 rows=2,472,794 loops=3)

3. 79.699 570.819 ↑ 1.3 21,987 3 / 3

(cost=24,182.08..194,528.44 rows=27,714 width=447) (actual time=195.133..570.819 rows=21,987 loops=3)

• Hash Cond: (cb.customer_id = c.id)
4. 47.840 347.613 ↑ 1.3 21,987 3 / 3

(cost=4,601.57..170,260.18 rows=27,714 width=178) (actual time=51.425..347.613 rows=21,987 loops=3)

• Hash Cond: (cb.id = cba.customer_branch_id)
5. 248.875 248.875 ↑ 2.3 18,267 3 / 3

Parallel Seq Scan on customer_branch cb (cost=0.00..162,954.89 rows=41,689 width=86) (actual time=0.053..248.875 rows=18,267 loops=3)

6. 34.586 50.898 ↑ 1.0 65,960 3 / 3

(cost=2,795.14..2,795.14 rows=66,514 width=92) (actual time=50.897..50.898 rows=65,960 loops=3)

• Buckets: 32,768 Batches: 4 Memory Usage: 2,412kB
7. 16.312 16.312 ↑ 1.0 66,514 3 / 3

Seq Scan on customer_branch_address cba (cost=0.00..2,795.14 rows=66,514 width=92) (actual time=0.022..16.312 rows=66,514 loops=3)

8. 37.811 143.507 ↑ 2.9 30,319 3 / 3

(cost=15,264.34..15,264.34 rows=88,734 width=269) (actual time=143.506..143.507 rows=30,319 loops=3)

• Buckets: 16,384 Batches: 8 Memory Usage: 1,187kB
9. 105.696 105.696 ↑ 2.9 30,319 3 / 3

Seq Scan on customer c (cost=0.00..15,264.34 rows=88,734 width=269) (actual time=0.765..105.696 rows=30,319 loops=3)

10. 3,583.827 3,583.827 ↓ 2.0 112 65,960 / 3

Index Scan using orders_customer_idx on orders o (cost=0.42..2.16 rows=55 width=2,005) (actual time=0.004..0.163 rows=112 loops=65,960)

• Index Cond: (customer_id = c.id)
Planning time Execution time : 1.855 ms : 18,699.019 ms