explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cJe1 : Optimization for: plan #H6oz3

Settings

Optimization path:

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

Unique (cost=712.84..712.98 rows=2 width=320) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=712.84..712.84 rows=2 width=320) (actual rows= loops=)

  • Sort Key: b.account_id, ac_1.contact_id, b.tp_account_id, b.is_approved, b.master_denetwork_ts, b.is_default_master, b.sproutkey, a_1.company_name, ac_1.user_id, ac_1.full_name, ac_1.first_name, ac_1.middle_name, ac_1.last_name, ac_1.affiliation, aa_1.address1, aa_1.address2, aa_1.city, aa_1.region_code, aa_1.postal_code, aa_1.country_code, ae_1.email_address, ap_1.phone_number, a_1.is_active, c.acct_group_id, xa2.last_login_ts, b.order_requires_approval, cc.currency_symbol, cc.currency_code
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=3.24..712.83 rows=2 width=320) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.95..708.82 rows=1 width=273) (actual rows= loops=)

  • Join Filter: ((aa.currency_code)::text = (cc.currency_code)::text)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.95..706.58 rows=1 width=271) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.53..706.07 rows=1 width=282) (actual rows= loops=)

  • Join Filter: ((ac_1.contact_id)::bpchar = (aa_1.contact_id)::bpchar)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2.11..705.56 rows=1 width=216) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.70..704.54 rows=1 width=188) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.41..704.13 rows=1 width=220) (actual rows= loops=)

  • Join Filter: ((b.account_id)::bpchar = (ac_1.account_id)::bpchar)
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..692.84 rows=1 width=110) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..688.91 rows=1 width=89) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Index Scan using ix_rel_masters_accounts_master_account_id on rel_masters_accounts b (cost=0.29..43.21 rows=32 width=64) (actual rows= loops=)

  • Index Cond: ((master_account_id)::bpchar = 'AC15100025754944'::bpchar)
  • Filter: is_active
13. 0.000 0.000 ↓ 0.0

Subquery Scan on xa2 (cost=0.42..20.17 rows=1 width=25) (actual rows= loops=)

  • Filter: ((b.account_id)::bpchar = (xa2.account_id)::bpchar)
14. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=0.42..19.86 rows=25 width=25) (actual rows= loops=)

  • Group Key: a.account_id
15. 0.000 0.000 ↓ 0.0

Index Scan using ix_acct_contacts_account_id on acct_contacts a (cost=0.42..19.48 rows=25 width=25) (actual rows= loops=)

  • Index Cond: ((account_id)::bpchar = (b.account_id)::bpchar)
16. 0.000 0.000 ↓ 0.0

Index Scan using ix_acct_accounts_account_id on acct_accounts aa (cost=0.29..3.93 rows=1 width=21) (actual rows= loops=)

  • Index Cond: ((account_id)::bpchar = (b.account_id)::bpchar)
17. 0.000 0.000 ↓ 0.0

Index Scan using ix_acct_contacts_account_id on acct_contacts ac_1 (cost=0.42..11.27 rows=2 width=110) (actual rows= loops=)

  • Index Cond: ((account_id)::bpchar = (aa.account_id)::bpchar)
  • Filter: ((contact_type)::text = 'Primary'::text)
18. 0.000 0.000 ↓ 0.0

Index Scan using ix_acct_accounts_account_id on acct_accounts a_1 (cost=0.29..0.41 rows=1 width=36) (actual rows= loops=)

  • Index Cond: ((account_id)::bpchar = (ac_1.account_id)::bpchar)
  • Filter: ((role_name)::text = 'members'::text)
19. 0.000 0.000 ↓ 0.0

Index Scan using pk_acct_phones on acct_phones ap_1 (cost=0.42..1.01 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (((contact_id)::bpchar = (ac_1.contact_id)::bpchar) AND ((phone_type)::text = 'Primary'::text))
20. 0.000 0.000 ↓ 0.0

Index Scan using pk_acct_addresses on acct_addresses aa_1 (cost=0.42..0.50 rows=1 width=66) (actual rows= loops=)

  • Index Cond: (((contact_id)::bpchar = (ap_1.contact_id)::bpchar) AND ((address_type)::text = 'Primary'::text))
21. 0.000 0.000 ↓ 0.0

Index Scan using ix_acct_e_info_contact_id on acct_e_info ae_1 (cost=0.42..0.51 rows=1 width=40) (actual rows= loops=)

  • Index Cond: ((contact_id)::bpchar = (aa_1.contact_id)::bpchar)
  • Filter: ((e_info_type)::text = 'Primary'::text)
22. 0.000 0.000 ↓ 0.0

Seq Scan on lookup_currencies cc (cost=0.00..2.09 rows=9 width=6) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using ix_rel_acct_groups_accts_account_id on rel_acct_groups_accts c (cost=0.29..3.99 rows=1 width=34) (actual rows= loops=)

  • Index Cond: ((b.account_id)::bpchar = (account_id)::bpchar)