explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7N72

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0 214,729 1

Unique (cost=0..0 rows=0 width=0) (actual rows=214,729 loops=1)

2.          

CTE cte_sc

3. 0.000 0.000 ↓ 0.0 1,969,605 1

HashAggregate (cost=0..0 rows=0 width=0) (actual rows=1,969,605 loops=1)

  • Group Key: svc.accountid
4. 0.000 0.000 ↓ 0.0 3,011,669 1

Seq Scan on servicecontract svc (cost=0..0 rows=0 width=0) (actual rows=3,011,669 loops=1)

  • Filter: ((status)::text = 'Active'::text)
5. 0.000 0.000 ↓ 0.0 214,729 1

Sort (cost=0..0 rows=0 width=0) (actual rows=214,729 loops=1)

  • Sort Key: u.sfid, 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_is_named_account, u.parent_account_csn, 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, cte_sc.number_of_active_contracts
  • Sort Method: quicksort Memory: 73,728kB
6. 0.000 0.000 ↓ 0.0 214,729 1

Hash Join (cost=0..0 rows=0 width=0) (actual rows=214,729 loops=1)

7. 0.000 0.000 ↓ 0.0 1,969,605 1

CTE Scan on cte_sc cte_sc (cost=0..0 rows=0 width=0) (actual rows=1,969,605 loops=1)

8. 0.000 0.000 ↓ 0.0 214,729 1

Hash (cost=0..0 rows=0 width=0) (actual rows=214,729 loops=1)

9. 0.000 0.000 ↓ 0.0 214,729 1

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

10. 0.000 0.000 ↓ 0.0 214,729 1

Unique (cost=0..0 rows=0 width=0) (actual rows=214,729 loops=1)

11. 0.000 0.000 ↓ 0.0 1,269,040 1

Sort (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

  • Sort Key: acc.sfid, (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
  • Sort Method: external merge Disk: 276,976kB
12. 0.000 0.000 ↓ 0.0 1,269,040 1

Hash Join (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

13. 0.000 0.000 ↓ 0.0 1,269,040 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

14. 0.000 0.000 ↓ 0.0 1,269,040 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

15. 0.000 0.000 ↓ 0.0 1,269,040 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

16. 0.000 0.000 ↓ 0.0 1,269,040 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

17. 0.000 0.000 ↓ 0.0 1,269,040 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=1,269,040 loops=1)

18. 0.000 0.000 ↓ 0.0 1,274,853 1

Nested Loop (cost=0..0 rows=0 width=0) (actual rows=1,274,853 loops=1)

19. 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 = '5108122958'::text)
20. 0.000 0.000 ↓ 0.0 1,274,853 1

Bitmap Heap Scan on asset__c ac (cost=0..0 rows=0 width=0) (actual rows=1,274,853 loops=1)

  • Heap Blocks: exact=334,762
21. 0.000 0.000 ↓ 0.0 0 1

BitmapOr (cost=0..0 rows=0 width=0) (actual rows=0 loops=1)

22. 0.000 0.000 ↓ 0.0 1,247,146 1

Bitmap Index Scan on hc_idx_asset__c_reseller_account__c (cost=0..0 rows=0 width=0) (actual rows=1,247,146 loops=1)

  • Index Cond: ((reseller_account__c)::text = (dacc1.sfid)::text)
23. 0.000 0.000 ↓ 0.0 600,766 1

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

  • Index Cond: ((account__c)::text = (dacc1.sfid)::text)
24. 0.000 0.000 ↓ 0.0 1 1,274,853

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

  • Index Cond: ((sfid)::text = (ac.end_customer_account__c)::text)
25. 0.000 0.000 ↓ 0.0 0 1,269,040

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=1,269,040)

  • Index Cond: ((acc.account_diagnostics_information__c)::text = (sfid)::text)
26. 0.000 0.000 ↓ 0.0 0 1,269,040

Index Scan using hcu_idx_industry__c_sfid on industry__c ind (cost=0..0 rows=0 width=0) (actual rows=0 loops=1,269,040)

  • Index Cond: ((acc.sic_code__c)::text = (sfid)::text)
27. 0.000 0.000 ↓ 0.0 0 1,269,040

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=1,269,040)

  • Index Cond: ((acc.autodesk_main_contact__c)::text = (sfid)::text)
28. 0.000 0.000 ↓ 0.0 0 1,269,040

Index Scan using hcu_idx_account_sfid on account pacc (cost=0..0 rows=0 width=0) (actual rows=0 loops=1,269,040)

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

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

30. 0.000 0.000 ↓ 0.0 250 1

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