explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xcXQ : Optimization for: Optimization for: plan #HmKm; plan #S5ay

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 17.307 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,581.33..23,134.82 rows=369 width=4,368) (actual time=17.301..17.307 rows=1 loops=1)

2. 0.003 14.375 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,581.08..22,571.18 rows=369 width=4,336) (actual time=14.369..14.375 rows=1 loops=1)

3. 0.004 14.371 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,580.67..20,173.74 rows=369 width=4,252) (actual time=14.365..14.371 rows=1 loops=1)

4. 0.004 14.367 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,580.25..17,162.77 rows=369 width=4,196) (actual time=14.361..14.367 rows=1 loops=1)

5. 0.005 14.362 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,579.83..14,163.79 rows=369 width=4,161) (actual time=14.357..14.362 rows=1 loops=1)

6. 0.004 14.357 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,579.41..11,172.82 rows=369 width=4,137) (actual time=14.353..14.357 rows=1 loops=1)

7. 0.010 14.352 ↑ 369.0 1 1

Hash Left Join (cost=1,578.98..8,174.77 rows=369 width=4,004) (actual time=14.348..14.352 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.006 11.238 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,553.73..8,055.42 rows=369 width=3,908) (actual time=11.234..11.238 rows=1 loops=1)

9. 0.009 11.217 ↑ 369.0 1 1

Nested Loop Left Join (cost=1,553.32..5,327.21 rows=369 width=3,777) (actual time=11.215..11.217 rows=1 loops=1)

10. 0.012 11.195 ↑ 369.0 1 1

Hash Left Join (cost=1,552.90..2,903.93 rows=369 width=2,996) (actual time=11.194..11.195 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.007 2.746 ↑ 369.0 1 1

Hash Left Join (cost=583.35..1,831.97 rows=369 width=2,965) (actual time=2.745..2.746 rows=1 loops=1)

  • Hash Cond: ((sc_items.inv_group_id)::bpchar = (inv_groups.inv_group_id)::bpchar)
12. 0.014 0.014 ↑ 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.013..0.014 rows=1 loops=1)

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

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

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

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

15. 4.116 8.437 ↑ 1.0 13,462 1

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

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

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

17. 0.013 0.013 ↑ 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.012..0.013 rows=1 loops=1)

  • Index Cond: ((sc_items.template_id)::bpchar = (template_id)::bpchar)
18. 0.015 0.015 ↑ 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.014..0.015 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.000 3.104 ↓ 0.0 0 1

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

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

Function Scan on priv_ord_samples_note_translation (cost=0.25..10.25 rows=1,000 width=160) (actual time=3.104..3.104 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.000 0.000 ↓ 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.000..0.000 rows=0 loops=1)

  • Index Cond: ((contact_id)::bpchar = (sc_items.sub_vendor_contact_id)::bpchar)
  • Filter: ((address_type)::text = 'Primary'::text)
25. 0.001 0.001 ↓ 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.001..0.001 rows=0 loops=1)

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

Subquery Scan on xtc (cost=0.25..1.52 rows=1 width=96) (actual time=2.928..2.928 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 2.927 ↓ 0.0 0 1

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

28. 2.927 2.927 ↓ 0.0 0 1

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

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