# Result: S5ay : Optimization for: plan #HmKm

Settings

### Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.006 419.836 ↑ 369.0 1 1

(cost=1,581.33..23,134.82 rows=369 width=4,368) (actual time=419.828..419.836 rows=1 loops=1)

2. 0.004 416.568 ↑ 369.0 1 1

(cost=1,581.08..22,571.18 rows=369 width=4,336) (actual time=416.560..416.568 rows=1 loops=1)

3. 0.004 416.552 ↑ 369.0 1 1

(cost=1,580.67..20,173.74 rows=369 width=4,252) (actual time=416.545..416.552 rows=1 loops=1)

4. 0.004 416.547 ↑ 369.0 1 1

(cost=1,580.25..17,162.77 rows=369 width=4,196) (actual time=416.541..416.547 rows=1 loops=1)

5. 0.004 416.542 ↑ 369.0 1 1

(cost=1,579.83..14,163.79 rows=369 width=4,161) (actual time=416.536..416.542 rows=1 loops=1)

6. 0.006 416.538 ↑ 369.0 1 1

(cost=1,579.41..11,172.82 rows=369 width=4,137) (actual time=416.532..416.538 rows=1 loops=1)

7. 0.018 416.531 ↑ 369.0 1 1

(cost=1,578.98..8,174.77 rows=369 width=4,004) (actual time=416.526..416.531 rows=1 loops=1)

• Hash Cond: (((sc_items.production_notes_id)::bpchar = (priv_ord_samples_note_translation.production_notes_id)::bpchar) AND ((sc_items.vendor_id)::bpchar = (priv_ord_samples_note_translation.vendor_id)::bpchar))
8. 0.005 414.728 ↑ 369.0 1 1

(cost=1,553.73..8,055.42 rows=369 width=3,908) (actual time=414.723..414.728 rows=1 loops=1)

9. 0.011 413.986 ↑ 369.0 1 1

(cost=1,553.32..5,327.21 rows=369 width=3,777) (actual time=413.983..413.986 rows=1 loops=1)

10. 0.029 413.960 ↑ 369.0 1 1

(cost=1,552.90..2,903.93 rows=369 width=2,996) (actual time=413.958..413.960 rows=1 loops=1)

• Hash Cond: (((sc_items.inv_group_id)::bpchar = (inv_group_items.inv_group_id)::bpchar) AND ((sc_items.inv_item_id)::bpchar = (inv_group_items.inv_item_id)::bpchar))
11. 0.019 122.314 ↑ 369.0 1 1

(cost=583.35..1,831.97 rows=369 width=2,965) (actual time=122.312..122.314 rows=1 loops=1)

• Hash Cond: ((sc_items.inv_group_id)::bpchar = (inv_groups.inv_group_id)::bpchar)
12. 0.015 0.015 ↑ 369.0 1 1

Index Scan using ix_sc_items_cart_id on sc_items (cost=0.43..1,246.27 rows=369 width=2,887) (actual time=0.014..0.015 rows=1 loops=1)

• Index Cond: ((cart_id)::bpchar = 'CA18080004816086'::bpchar)
13. 1.423 122.280 ↑ 1.0 4,530 1

(cost=526.30..526.30 rows=4,530 width=95) (actual time=122.280..122.280 rows=4,530 loops=1)

• Buckets: 1024 Batches: 1 Memory Usage: 458kB
14. 120.857 120.857 ↑ 1.0 4,530 1

Seq Scan on inv_groups (cost=0.00..526.30 rows=4,530 width=95) (actual time=16.205..120.857 rows=4,530 loops=1)

15. 3.935 291.617 ↑ 1.0 13,462 1

(cost=767.62..767.62 rows=13,462 width=65) (actual time=291.617..291.617 rows=13,462 loops=1)

• Buckets: 2048 Batches: 1 Memory Usage: 1279kB
16. 287.682 287.682 ↑ 1.0 13,462 1

Seq Scan on inv_group_items (cost=0.00..767.62 rows=13,462 width=65) (actual time=3.165..287.682 rows=13,462 loops=1)

17. 0.015 0.015 ↑ 1.0 1 1

Index Scan using pk_tpl_templates on tpl_templates (cost=0.41..6.56 rows=1 width=798) (actual time=0.014..0.015 rows=1 loops=1)

• Index Cond: ((sc_items.template_id)::bpchar = (template_id)::bpchar)
18. 0.737 0.737 ↑ 1.0 1 1

Index Scan using ix_tpl_assignments_assignment_id on tpl_assignments (cost=0.41..7.38 rows=1 width=165) (actual time=0.736..0.737 rows=1 loops=1)

• Index Cond: ((sc_items.assignment_id)::bpchar = (assignment_id)::bpchar)
• Filter: ((sc_items.template_id)::bpchar = (template_id)::bpchar)
19. 0.001 1.785 ↓ 0.0 0 1

(cost=10.25..10.25 rows=1,000 width=160) (actual time=1.785..1.785 rows=0 loops=1)

• Buckets: 1024 Batches: 1 Memory Usage: 0kB
20. 1.784 1.784 ↓ 0.0 0 1

Function Scan on priv_ord_samples_note_translation (cost=0.25..10.25 rows=1,000 width=160) (actual time=1.784..1.784 rows=0 loops=1)

21. 0.001 0.001 ↓ 0.0 0 1

Index Scan using pk_acct_contacts on acct_contacts (cost=0.42..8.11 rows=1 width=150) (actual time=0.001..0.001 rows=0 loops=1)

• Index Cond: ((contact_id)::bpchar = (sc_items.sub_vendor_contact_id)::bpchar)
22. 0.000 0.000 ↓ 0.0 0 1

Index Scan using pk_acct_phones on acct_phones (cost=0.42..8.10 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=1)

• Index Cond: (((contact_id)::bpchar = (sc_items.sub_vendor_contact_id)::bpchar) AND ((phone_type)::text = 'Primary'::text))
23. 0.001 0.001 ↓ 0.0 0 1

Index Scan using ix_acct_e_info_contact_id on acct_e_info (cost=0.42..8.12 rows=1 width=52) (actual time=0.001..0.001 rows=0 loops=1)

• Index Cond: ((contact_id)::bpchar = (sc_items.sub_vendor_contact_id)::bpchar)
• Filter: ((e_info_type)::text = 'Primary'::text)
24. 0.001 0.001 ↓ 0.0 0 1

Index Scan using ix_acct_addresses_contact_id on acct_addresses (cost=0.42..8.15 rows=1 width=73) (actual time=0.001..0.001 rows=0 loops=1)

• Index Cond: ((contact_id)::bpchar = (sc_items.sub_vendor_contact_id)::bpchar)
25. 0.012 0.012 ↓ 0.0 0 1

Index Scan using pk_ct_provisions on ct_provisions (cost=0.41..6.49 rows=1 width=101) (actual time=0.012..0.012 rows=0 loops=1)

• Index Cond: ((provision_id)::bpchar = (sc_items.provision_id)::bpchar)
26. 0.001 3.262 ↓ 0.0 0 1

Subquery Scan on xtc (cost=0.25..1.52 rows=1 width=96) (actual time=3.262..3.262 rows=0 loops=1)

• Filter: (((xtc.cart_id)::bpchar = 'CA18080004816086'::bpchar) AND ((sc_items.cart_id)::bpchar = (xtc.cart_id)::bpchar) AND ((sc_items.cart_item_id)::bpchar = (xtc.cart_item_id)::bpchar))
27. 0.000 3.261 ↓ 0.0 0 1

(cost=0.25..1.50 rows=1 width=96) (actual time=3.261..3.261 rows=0 loops=1)

28. 3.261 3.261 ↓ 0.0 0 1

Function Scan on priv_cart_item_tax_classifications tc (cost=0.25..1.50 rows=1 width=96) (actual time=3.261..3.261 rows=0 loops=1)

• Filter: (detail_price_type = 'BASE PRICE'::text)