explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.005 10.582 ↑ 1.0 1 1

Nested Loop Left Join (cost=278.96..370.01 rows=1 width=4,368) (actual time=10.576..10.582 rows=1 loops=1)

2. 0.002 7.705 ↑ 1.0 1 1

Nested Loop Left Join (cost=278.71..368.48 rows=1 width=4,336) (actual time=7.699..7.705 rows=1 loops=1)

3. 0.003 7.703 ↑ 1.0 1 1

Nested Loop Left Join (cost=278.30..360.04 rows=1 width=4,252) (actual time=7.697..7.703 rows=1 loops=1)

4. 0.003 7.700 ↑ 1.0 1 1

Nested Loop Left Join (cost=277.88..351.59 rows=1 width=4,196) (actual time=7.695..7.700 rows=1 loops=1)

5. 0.013 7.697 ↑ 1.0 1 1

Nested Loop Left Join (cost=277.45..343.14 rows=1 width=4,161) (actual time=7.692..7.697 rows=1 loops=1)

6. 0.002 7.684 ↑ 1.0 1 1

Nested Loop Left Join (cost=277.03..334.68 rows=1 width=4,137) (actual time=7.679..7.684 rows=1 loops=1)

7. 0.003 7.682 ↑ 1.0 1 1

Nested Loop Left Join (cost=276.61..326.23 rows=1 width=4,004) (actual time=7.677..7.682 rows=1 loops=1)

8. 0.002 7.672 ↑ 1.0 1 1

Nested Loop Left Join (cost=276.19..317.79 rows=1 width=3,873) (actual time=7.668..7.672 rows=1 loops=1)

9. 0.002 7.649 ↑ 1.0 1 1

Nested Loop Left Join (cost=275.78..309.35 rows=1 width=3,092) (actual time=7.646..7.649 rows=1 loops=1)

10. 0.002 7.647 ↑ 1.0 1 1

Nested Loop Left Join (cost=275.49..301.03 rows=1 width=3,061) (actual time=7.644..7.647 rows=1 loops=1)

11. 0.013 7.645 ↑ 1.0 1 1

Hash Right Join (cost=275.21..292.72 rows=1 width=2,983) (actual time=7.642..7.645 rows=1 loops=1)

  • Hash Cond: (((priv_ord_samples_note_translation.production_notes_id)::bpchar = (sc_items.production_notes_id)::bpchar) AND ((priv_ord_samples_note_translation.vendor_id)::bpchar = (sc_items.vendor_id)::bpchar))
12. 0.665 0.665 ↓ 0.0 0 1

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

13. 0.004 6.967 ↑ 1.0 1 1

Hash (cost=274.95..274.95 rows=1 width=2,887) (actual time=6.967..6.967 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
14. 0.008 6.963 ↑ 1.0 1 1

Bitmap Heap Scan on sc_items (cost=270.93..274.95 rows=1 width=2,887) (actual time=6.963..6.963 rows=1 loops=1)

  • Recheck Cond: (((cart_id)::bpchar = 'CA18080004816086'::bpchar) AND ((item_order_status)::text = 'OK'::text))
15. 0.001 6.955 ↓ 0.0 0 1

BitmapAnd (cost=270.93..270.93 rows=1 width=0) (actual time=6.955..6.955 rows=0 loops=1)

16. 0.009 0.009 ↑ 369.0 1 1

Bitmap Index Scan on ix_sc_items_cart_id (cost=0.00..15.20 rows=369 width=0) (actual time=0.009..0.009 rows=1 loops=1)

  • Index Cond: ((cart_id)::bpchar = 'CA18080004816086'::bpchar)
17. 6.945 6.945 ↓ 4.5 44,821 1

Bitmap Index Scan on ix_sc_items_item_order_status (cost=0.00..255.48 rows=10,007 width=0) (actual time=6.945..6.945 rows=44,821 loops=1)

  • Index Cond: ((item_order_status)::text = 'OK'::text)
18. 0.000 0.000 ↓ 0.0 0 1

Index Scan using pk_inv_groups on inv_groups (cost=0.28..8.30 rows=1 width=95) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: ((inv_group_id)::bpchar = (sc_items.inv_group_id)::bpchar)
19. 0.000 0.000 ↓ 0.0 0 1

Index Scan using pk_inv_group_items on inv_group_items (cost=0.29..8.30 rows=1 width=65) (actual time=0.000..0.000 rows=0 loops=1)

  • Index Cond: (((inv_group_id)::bpchar = (sc_items.inv_group_id)::bpchar) AND ((inv_item_id)::bpchar = (sc_items.inv_item_id)::bpchar))
20. 0.021 0.021 ↑ 1.0 1 1

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

  • Index Cond: ((sc_items.template_id)::bpchar = (template_id)::bpchar)
21. 0.007 0.007 ↑ 1.0 1 1

Index Scan using uk_tpl_assignments_template_assignment_cust_source on tpl_assignments (cost=0.41..8.43 rows=1 width=165) (actual time=0.006..0.007 rows=1 loops=1)

  • Index Cond: (((sc_items.template_id)::bpchar = (template_id)::bpchar) AND ((sc_items.assignment_id)::bpchar = (assignment_id)::bpchar))
22. 0.000 0.000 ↓ 0.0 0 1

Index Scan using uk_acct_contacts_contact_account_id on acct_contacts (cost=0.42..8.44 rows=1 width=150) (actual time=0.000..0.000 rows=0 loops=1)

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

Index Scan using pk_acct_phones on acct_phones (cost=0.42..8.44 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))
24. 0.000 0.000 ↓ 0.0 0 1

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

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

Index Scan using ix_acct_addresses_contact_id on acct_addresses (cost=0.42..8.44 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)
26. 0.000 0.000 ↓ 0.0 0 1

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

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

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

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

29. 2.870 2.870 ↓ 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.870..2.870 rows=0 loops=1)

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