# Result: 3WDY : Optimization for: plan #Rl3v

Settings

### Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

(cost=10,681.80..10,708.47 rows=10,667 width=12) (actual rows= loops=)

• Sort Key: (sum((partsupp.ps_supplycost * (partsupp.ps_availqty)::double precision))) DESC
2.

Initplan (for Sort)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=4,624.06..4,624.07 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

(cost=11.81..4,384.06 rows=32,000 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

(cost=11.38..244.78 rows=400 width=4) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Seq Scan on nation nation_1 (cost=0.00..1.31 rows=1 width=4) (actual rows= loops=)

• Filter: (n_name = 'VIETNAM'::bpchar)
7. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on supplier supplier_1 (cost=11.38..239.47 rows=400 width=8) (actual rows= loops=)

• Recheck Cond: (s_nationkey = nation_1.n_nationkey)
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on supplier_s_nationkey_s_suppkey_idx (cost=0.00..11.29 rows=400 width=0) (actual rows= loops=)

• Index Cond: (s_nationkey = nation_1.n_nationkey)
9. 0.000 0.000 ↓ 0.0

Index Scan using partsupp_ps_suppkey_idx on partsupp partsupp_1 (cost=0.42..9.55 rows=80 width=12) (actual rows= loops=)

• Index Cond: (ps_suppkey = supplier_1.s_suppkey)
10. 0.000 0.000 ↓ 0.0

(cost=4,944.06..5,344.06 rows=10,667 width=12) (actual rows= loops=)

• Group Key: partsupp.ps_partkey
• Filter: (sum((partsupp.ps_supplycost * (partsupp.ps_availqty)::double precision)) > \$2)
11. 0.000 0.000 ↓ 0.0

(cost=11.81..4,384.06 rows=32,000 width=12) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

(cost=11.38..244.78 rows=400 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on nation (cost=0.00..1.31 rows=1 width=4) (actual rows= loops=)

• Filter: (n_name = 'VIETNAM'::bpchar)
14. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on supplier (cost=11.38..239.47 rows=400 width=8) (actual rows= loops=)

• Recheck Cond: (s_nationkey = nation.n_nationkey)
15. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on supplier_s_nationkey_s_suppkey_idx (cost=0.00..11.29 rows=400 width=0) (actual rows= loops=)

• Index Cond: (s_nationkey = nation.n_nationkey)
16. 0.000 0.000 ↓ 0.0

Index Scan using partsupp_ps_suppkey_idx on partsupp (cost=0.42..9.55 rows=80 width=16) (actual rows= loops=)

• Index Cond: (ps_suppkey = supplier.s_suppkey)