explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pJnu

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0 12,332 1

Unique (cost=0..0 rows=0 width=0) (actual rows=12,332 loops=1)

2. 0.000 0.000 ↓ 0.0 17,279 1

Sort (cost=0..0 rows=0 width=0) (actual rows=17,279 loops=1)

  • Sort Key: u.csn, u.name, u.buying_readiness_score, u.is_named_account, u.segment, u.type, u.address1, u.address2, u.address3, u.city, u.country, u.country_code, u.county, u.geo, u.industry, u.phone_number, u.state_province, u.postal, u.parent_account_csn, u.parent_is_named_account, u.autodesk_main_contact, u.autodesk_main_contact_email, u.sales_region, u.status, u.language, u.website, u.industry_group, u.industry_segment, u.industry_sub_segment, u.local_name, u.number_of_active_contracts
  • Sort Method: quicksort Memory: 9,394kB
3. 0.000 0.000 ↓ 0.0 17,279 1

Subquery Scan on u (cost=0..0 rows=0 width=0) (actual rows=17,279 loops=1)

4. 0.000 0.000 ↓ 0.0 17,279 1

Unique (cost=0..0 rows=0 width=0) (actual rows=17,279 loops=1)

5. 0.000 0.000 ↓ 0.0 21,892 1

Sort (cost=0..0 rows=0 width=0) (actual rows=21,892 loops=1)

  • Sort Key: ac.account__c, (CASE WHEN ((acc.named_account_group__c)::text = 'Named Account'::text) THEN 'True'::text ELSE 'False'::text END), adi.readiness_score__c, acc.account_csn__c, acc.name, acc.named_account_group__c, acc.address1__c, acc.address2__c, acc.address3__c, acc.city__c, acc.country_picklist__c, cc.country_code__c, acc.county__c, acc.geo__c, acc.industry, (CASE WHEN ((pacc.named_account_group__c)::text = 'Named Account'::text) THEN 'True'::text ELSE 'False'::text END), (CASE WHEN (pacc.account_csn__c IS NOT NULL) THEN pacc.account_csn__c ELSE acc.account_csn__c END), acc.phone, acc.state_province__c, acc.type, acc.zip_postal__c, sfu.name, sfu.ad_email__c, acc.sales_region__c, acc.status__c, acc.language__c, acc.website, ind.adsk_industry_group__c, ind.adsk_industry_segment__c, ind.adsk_industry_sub_segment__c, acc.account_local_name__c, ((SubPlan 1))
  • Sort Method: quicksort Memory: 11,774kB
6. 0.000 0.000 ↓ 0.0 21,892 1

Append (cost=0..0 rows=0 width=0) (actual rows=21,892 loops=1)

7. 0.000 0.000 ↓ 0.0 17,223 1

Unique (cost=0..0 rows=0 width=0) (actual rows=17,223 loops=1)

8. 0.000 0.000 ↓ 0.0 220,226 1

Sort (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

  • Sort Key: ac.account__c, (CASE WHEN ((acc.named_account_group__c)::text = 'Named Account'::text) THEN 'True'::text ELSE 'False'::text END), adi.readiness_score__c, acc.account_csn__c, acc.name, acc.named_account_group__c, acc.address1__c, acc.address2__c, acc.address3__c, acc.city__c, acc.country_picklist__c, cc.country_code__c, acc.county__c, acc.geo__c, acc.industry, (CASE WHEN ((pacc.named_account_group__c)::text = 'Named Account'::text) THEN 'True'::text ELSE 'False'::text END), (CASE WHEN (pacc.account_csn__c IS NOT NULL) THEN pacc.account_csn__c ELSE acc.account_csn__c END), acc.phone, acc.state_province__c, acc.type, acc.zip_postal__c, sfu.name, sfu.ad_email__c, acc.sales_region__c, acc.status__c, acc.language__c, acc.website, ind.adsk_industry_group__c, ind.adsk_industry_segment__c, ind.adsk_industry_sub_segment__c, acc.account_local_name__c, ((SubPlan 1))
  • Sort Method: quicksort Memory: 87,338kB
9. 0.000 0.000 ↓ 0.0 220,226 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

10. 0.000 0.000 ↓ 0.0 220,226 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

11. 0.000 0.000 ↓ 0.0 220,226 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

12. 0.000 0.000 ↓ 0.0 220,226 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

13. 0.000 0.000 ↓ 0.0 220,226 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

14. 0.000 0.000 ↓ 0.0 220,226 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=220,226 loops=1)

15. 0.000 0.000 ↓ 0.0 221,938 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=221,938 loops=1)

16. 0.000 0.000 ↓ 0.0 1 1

Index Scan using hcu_idx_account_account_csn__c on account dacc1 (cost=0..0 rows=0 width=0) (actual rows=1 loops=1)

  • Index Cond: ((account_csn__c)::text = '0070112132'::text)
17. 0.000 0.000 ↓ 0.0 221,938 1

Index Scan using hc_idx_asset__c_reseller_account__c on asset__c ac (cost=0..0 rows=0 width=0) (actual rows=221,938 loops=1)

  • Index Cond: ((reseller_account__c)::text = (dacc1.sfid)::text)
18. 0.000 0.000 ↓ 0.0 1 221,938

Index Scan using hcu_idx_account_sfid on account acc (cost=0..0 rows=0 width=0) (actual rows=1 loops=221,938)

  • Index Cond: ((sfid)::text = (ac.end_customer_account__c)::text)
19. 0.000 0.000 ↓ 0.0 0 220,226

Index Scan using hcu_idx_account_diagnostics_information__c_sfid on account_diagnostics_information__c adi (cost=0..0 rows=0 width=0) (actual rows=0 loops=220,226)

  • Index Cond: ((acc.account_diagnostics_information__c)::text = (sfid)::text)
20. 0.000 0.000 ↓ 0.0 0 220,226

Index Scan using hcu_idx_industry__c_sfid on industry__c ind (cost=0..0 rows=0 width=0) (actual rows=0 loops=220,226)

  • Index Cond: ((acc.sic_code__c)::text = (sfid)::text)
21. 0.000 0.000 ↓ 0.0 0 220,226

Index Scan using hcu_idx_reporting_relationship__c_sfid on reporting_relationship__c sfu (cost=0..0 rows=0 width=0) (actual rows=0 loops=220,226)

  • Index Cond: ((acc.autodesk_main_contact__c)::text = (sfid)::text)
22. 0.000 0.000 ↓ 0.0 0 220,226

Index Scan using hcu_idx_account_sfid on account pacc (cost=0..0 rows=0 width=0) (actual rows=0 loops=220,226)

  • Index Cond: ((acc.parentid)::text = (sfid)::text)
23. 0.000 0.000 ↓ 0.0 250 220,226

Seq Scan on country_salesorg_mapping__c cc (cost=0..0 rows=0 width=0) (actual rows=250 loops=220,226)

24.          

SubPlan (for Nested Loop)

25. 0.000 0.000 ↓ 0.0 1 220,226

Aggregate (cost=0..0 rows=0 width=0) (actual rows=1 loops=220,226)

26. 0.000 0.000 ↓ 0.0 692 220,226

Index Scan using hc_idx_servicecontract_accountid on servicecontract svc (cost=0..0 rows=0 width=0) (actual rows=692 loops=220,226)

  • Index Cond: ((accountid)::text = (acc.sfid)::text)
  • Filter: ((status)::text = 'Active'::text)
27. 0.000 0.000 ↓ 0.0 4,669 1

Unique (cost=0..0 rows=0 width=0) (actual rows=4,669 loops=1)

28. 0.000 0.000 ↓ 0.0 163,846 1

Sort (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

  • Sort Key: ac_1.account__c, (CASE WHEN ((acc_1.named_account_group__c)::text = 'Named Account'::text) THEN 'True'::text ELSE 'False'::text END), adi_1.readiness_score__c, acc_1.account_csn__c, acc_1.name, acc_1.named_account_group__c, acc_1.address1__c, acc_1.address2__c, acc_1.address3__c, acc_1.city__c, acc_1.country_picklist__c, cc_1.country_code__c, acc_1.county__c, acc_1.geo__c, acc_1.industry, (CASE WHEN ((pacc_1.named_account_group__c)::text = 'Named Account'::text) THEN 'True'::text ELSE 'False'::text END), (CASE WHEN (pacc_1.account_csn__c IS NOT NULL) THEN pacc_1.account_csn__c ELSE acc_1.account_csn__c END), acc_1.phone, acc_1.state_province__c, acc_1.type, acc_1.zip_postal__c, sfu_1.name, sfu_1.ad_email__c, acc_1.sales_region__c, acc_1.status__c, acc_1.language__c, acc_1.website, ind_1.adsk_industry_group__c, ind_1.adsk_industry_segment__c, ind_1.adsk_industry_sub_segment__c, acc_1.account_local_name__c, ((SubPlan 2))
  • Sort Method: quicksort Memory: 58,414kB
29. 0.000 0.000 ↓ 0.0 163,846 1

Hash Join (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

30. 0.000 0.000 ↓ 0.0 163,846 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

31. 0.000 0.000 ↓ 0.0 163,846 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

32. 0.000 0.000 ↓ 0.0 163,846 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

33. 0.000 0.000 ↓ 0.0 163,846 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

34. 0.000 0.000 ↓ 0.0 163,846 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=163,846 loops=1)

35. 0.000 0.000 ↓ 0.0 164,716 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=164,716 loops=1)

36. 0.000 0.000 ↓ 0.0 1 1

Index Scan using hcu_idx_account_account_csn__c on account dacc (cost=0..0 rows=0 width=0) (actual rows=1 loops=1)

  • Index Cond: ((account_csn__c)::text = '0070112132'::text)
37. 0.000 0.000 ↓ 0.0 164,716 1

Bitmap Heap Scan on asset__c ac_1 (cost=0..0 rows=0 width=0) (actual rows=164,716 loops=1)

  • Heap Blocks: exact=66,460
38. 0.000 0.000 ↓ 0.0 164,760 1

Bitmap Index Scan on hc_idx_asset__c_account__c (cost=0..0 rows=0 width=0) (actual rows=164,760 loops=1)

  • Index Cond: ((account__c)::text = (dacc.sfid)::text)
39. 0.000 0.000 ↓ 0.0 1 164,716

Index Scan using hcu_idx_account_sfid on account acc_1 (cost=0..0 rows=0 width=0) (actual rows=1 loops=164,716)

  • Index Cond: ((sfid)::text = (ac_1.end_customer_account__c)::text)
40. 0.000 0.000 ↓ 0.0 0 163,846

Index Scan using hcu_idx_account_diagnostics_information__c_sfid on account_diagnostics_information__c adi_1 (cost=0..0 rows=0 width=0) (actual rows=0 loops=163,846)

  • Index Cond: ((acc_1.account_diagnostics_information__c)::text = (sfid)::text)
41. 0.000 0.000 ↓ 0.0 0 163,846

Index Scan using hcu_idx_industry__c_sfid on industry__c ind_1 (cost=0..0 rows=0 width=0) (actual rows=0 loops=163,846)

  • Index Cond: ((acc_1.sic_code__c)::text = (sfid)::text)
42. 0.000 0.000 ↓ 0.0 0 163,846

Index Scan using hcu_idx_reporting_relationship__c_sfid on reporting_relationship__c sfu_1 (cost=0..0 rows=0 width=0) (actual rows=0 loops=163,846)

  • Index Cond: ((acc_1.autodesk_main_contact__c)::text = (sfid)::text)
43. 0.000 0.000 ↓ 0.0 0 163,846

Index Scan using hcu_idx_account_sfid on account pacc_1 (cost=0..0 rows=0 width=0) (actual rows=0 loops=163,846)

  • Index Cond: ((acc_1.parentid)::text = (sfid)::text)
44. 0.000 0.000 ↓ 0.0 250 1

Hash (cost=0..0 rows=0 width=0) (actual rows=250 loops=1)

45. 0.000 0.000 ↓ 0.0 250 1

Seq Scan on country_salesorg_mapping__c cc_1 (cost=0..0 rows=0 width=0) (actual rows=250 loops=1)

46.          

SubPlan (for Hash Join)

47. 0.000 0.000 ↓ 0.0 1 163,846

Aggregate (cost=0..0 rows=0 width=0) (actual rows=1 loops=163,846)

48. 0.000 0.000 ↓ 0.0 932 163,846

Index Scan using hc_idx_servicecontract_accountid on servicecontract svc_1 (cost=0..0 rows=0 width=0) (actual rows=932 loops=163,846)

  • Index Cond: ((accountid)::text = (acc_1.sfid)::text)
  • Filter: ((status)::text = 'Active'::text)