explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qmOd : Optimization for: plan #RwQe

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.006 217.632 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,573.38..23,467.24 rows=379 width=3,933) (actual time=217.624..217.632 rows=1 loops=1)

2. 0.004 213.476 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,573.13..22,888.32 rows=379 width=3,901) (actual time=213.469..213.476 rows=1 loops=1)

3. 0.005 213.471 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,572.72..20,442.51 rows=379 width=3,817) (actual time=213.465..213.471 rows=1 loops=1)

4. 0.004 213.466 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,572.29..17,455.01 rows=379 width=3,761) (actual time=213.460..213.466 rows=1 loops=1)

5. 0.004 213.461 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,571.87..14,375.51 rows=379 width=3,726) (actual time=213.455..213.461 rows=1 loops=1)

6. 0.005 213.456 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,571.45..11,352.01 rows=379 width=3,702) (actual time=213.450..213.456 rows=1 loops=1)

7. 0.017 213.450 ↑ 379.0 1 1

Hash Left Join (cost=1,571.03..8,321.46 rows=379 width=3,570) (actual time=213.445..213.450 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 212.402 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,545.78..8,199.56 rows=379 width=3,474) (actual time=212.397..212.402 rows=1 loops=1)

9. 0.027 212.368 ↑ 379.0 1 1

Nested Loop Left Join (cost=1,545.36..5,406.90 rows=379 width=3,343) (actual time=212.365..212.368 rows=1 loops=1)

10. 0.026 212.320 ↑ 379.0 1 1

Hash Left Join (cost=1,544.95..2,931.20 rows=379 width=2,570) (actual time=212.319..212.320 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 150.371 ↑ 379.0 1 1

Hash Left Join (cost=583.67..1,861.90 rows=379 width=2,539) (actual time=150.370..150.371 rows=1 loops=1)

  • Hash Cond: ((sc_items.inv_group_id)::bpchar = (inv_groups.inv_group_id)::bpchar)
12. 0.021 0.021 ↑ 379.0 1 1

Index Scan using ix_sc_items_cart_id on sc_items (cost=0.43..1,275.80 rows=379 width=2,461) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: ((cart_id)::bpchar = 'CA18110005162286'::bpchar)
13. 1.661 150.331 ↓ 1.0 4,553 1

Hash (cost=526.44..526.44 rows=4,544 width=95) (actual time=150.331..150.331 rows=4,553 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 461kB
14. 148.670 148.670 ↓ 1.0 4,553 1

Seq Scan on inv_groups (cost=0.00..526.44 rows=4,544 width=95) (actual time=9.108..148.670 rows=4,553 loops=1)

15. 4.876 61.923 ↑ 1.0 13,851 1

Hash (cost=753.51..753.51 rows=13,851 width=65) (actual time=61.923..61.923 rows=13,851 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 1317kB
16. 57.047 57.047 ↑ 1.0 13,851 1

Seq Scan on inv_group_items (cost=0.00..753.51 rows=13,851 width=65) (actual time=1.670..57.047 rows=13,851 loops=1)

17. 0.021 0.021 ↑ 1.0 1 1

Index Scan using pk_tpl_templates on tpl_templates (cost=0.41..6.52 rows=1 width=790) (actual time=0.020..0.021 rows=1 loops=1)

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

Index Scan using ix_tpl_assignments_assignment_id on tpl_assignments (cost=0.41..7.36 rows=1 width=165) (actual time=0.027..0.028 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.031 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
20. 1.030 1.030 ↓ 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.030..1.030 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..7.99 rows=1 width=149) (actual time=0.001..0.001 rows=0 loops=1)

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

Index Scan using pk_acct_phones on acct_phones (cost=0.42..7.97 rows=1 width=41) (actual time=0.001..0.001 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..7.87 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.44 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.005 4.150 ↑ 1.0 1 1

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

  • Filter: (((xtc.cart_id)::bpchar = 'CA18110005162286'::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 4.145 ↑ 1.0 1 1

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

28. 4.145 4.145 ↑ 1.0 1 1

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

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