explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Vmf

Settings
# exclusive inclusive rows x rows loops node
1. 0.042 0.779 ↑ 2.0 1 1

Nested Loop Left Join (cost=104.30..215.27 rows=2 width=3,724) (actual time=0.773..0.779 rows=1 loops=1)

2.          

CTE teamleadquery

3. 0.063 0.337 ↓ 6.0 6 1

GroupAggregate (cost=91.73..91.75 rows=1 width=58) (actual time=0.300..0.337 rows=6 loops=1)

  • Group Key: ip_1.team__c
4. 0.030 0.274 ↓ 8.0 8 1

Sort (cost=91.73..91.73 rows=1 width=28) (actual time=0.272..0.274 rows=8 loops=1)

  • Sort Key: ip_1.team__c
  • Sort Method: quicksort Memory: 25kB
5. 0.015 0.244 ↓ 8.0 8 1

Nested Loop (cost=0.84..91.72 rows=1 width=28) (actual time=0.055..0.244 rows=8 loops=1)

6. 0.029 0.029 ↑ 1.1 8 1

Index Scan using hc_idx_internal_app_permissions__c_user_profile__c on internal_app_permissions__c ip_1 (cost=0.28..14.49 rows=9 width=32) (actual time=0.017..0.029 rows=8 loops=1)

  • Index Cond: ((user_profile__c)::text = 'Team Lead'::text)
7. 0.200 0.200 ↑ 1.0 1 8

Index Scan using contact_idx_sfid on contact c_1 (cost=0.56..8.58 rows=1 width=34) (actual time=0.025..0.025 rows=1 loops=8)

  • Index Cond: ((sfid)::text = (ip_1.contact__c)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
8. 0.005 0.666 ↑ 2.0 1 1

Nested Loop Left Join (cost=11.99..81.83 rows=2 width=3,034) (actual time=0.659..0.666 rows=1 loops=1)

9. 0.005 0.604 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.38..66.52 rows=1 width=3,028) (actual time=0.599..0.604 rows=1 loops=1)

  • Join Filter: ((tq.team__c)::text = (ip.team__c)::text)
  • Rows Removed by Join Filter: 6
10. 0.006 0.253 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.38..66.48 rows=1 width=2,996) (actual time=0.249..0.253 rows=1 loops=1)

11. 0.010 0.231 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.10..59.25 rows=1 width=3,002) (actual time=0.229..0.231 rows=1 loops=1)

  • Join Filter: ((co.recordtypeid)::text = '0120H000001O7IWQA0'::text)
12. 0.004 0.190 ↑ 1.0 1 1

Nested Loop (cost=2.54..50.66 rows=1 width=2,964) (actual time=0.188..0.190 rows=1 loops=1)

13. 0.005 0.150 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.98..42.08 rows=1 width=2,949) (actual time=0.148..0.150 rows=1 loops=1)

14. 0.004 0.113 ↑ 1.0 1 1

Nested Loop (cost=1.56..33.64 rows=1 width=2,943) (actual time=0.112..0.113 rows=1 loops=1)

15. 0.004 0.087 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.28..25.34 rows=1 width=2,939) (actual time=0.085..0.087 rows=1 loops=1)

16. 0.019 0.077 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.85..16.89 rows=1 width=2,851) (actual time=0.076..0.077 rows=1 loops=1)

17. 0.021 0.021 ↑ 1.0 1 1

Index Scan using qa_form__c_pkey on qa_form__c qa (cost=0.29..8.31 rows=1 width=2,459) (actual time=0.020..0.021 rows=1 loops=1)

  • Index Cond: (id = 67162)
18. 0.037 0.037 ↑ 1.0 1 1

Index Scan using hcu_idx_case_sfid on "case" c (cost=0.56..8.58 rows=1 width=392) (actual time=0.037..0.037 rows=1 loops=1)

  • Index Cond: ((qa.case__c)::text = (sfid)::text)
19. 0.006 0.006 ↓ 0.0 0 1

Index Scan using service_request1__c_idx_sfid on service_request1__c sr (cost=0.43..8.45 rows=1 width=107) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((sfid)::text = (qa.service_request_pop__c)::text)
20. 0.022 0.022 ↑ 1.0 1 1

Index Scan using account_idx_sfid on account acc (cost=0.28..8.30 rows=1 width=42) (actual time=0.022..0.022 rows=1 loops=1)

  • Index Cond: ((sfid)::text = (qa.case_account__c)::text)
21. 0.032 0.032 ↑ 1.0 1 1

Index Scan using property__c_idx_sfid on property__c pr (cost=0.42..8.44 rows=1 width=44) (actual time=0.032..0.032 rows=1 loops=1)

  • Index Cond: ((qa.case_property__c)::text = (sfid)::text)
22. 0.036 0.036 ↑ 1.0 1 1

Index Scan using contact_idx_sfid on contact co (cost=0.56..8.58 rows=1 width=53) (actual time=0.036..0.036 rows=1 loops=1)

  • Index Cond: ((sfid)::text = (qa.qa_reviewer__c)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
23. 0.031 0.031 ↑ 1.0 1 1

Index Scan using contact_idx_sfid on contact coo (cost=0.56..8.58 rows=1 width=57) (actual time=0.031..0.031 rows=1 loops=1)

  • Index Cond: ((qa.property_consultant__c)::text = (sfid)::text)
24. 0.016 0.016 ↑ 1.0 1 1

Index Scan using hc_idx_internal_app_permissions__c_contact__c on internal_app_permissions__c ip (cost=0.28..7.23 rows=1 width=32) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: ((contact__c)::text = (coo.sfid)::text)
25. 0.346 0.346 ↓ 6.0 6 1

CTE Scan on teamleadquery tq (cost=0.00..0.02 rows=1 width=548) (actual time=0.303..0.346 rows=6 loops=1)

26. 0.008 0.057 ↑ 2.0 1 1

Bitmap Heap Scan on internal_app_permissions__c ipp (cost=8.61..15.30 rows=2 width=32) (actual time=0.055..0.057 rows=1 loops=1)

  • Recheck Cond: (((team__c)::text = (ip.team__c)::text) AND ((user_profile__c)::text = 'Supervisor'::text))
  • Heap Blocks: exact=1
27. 0.006 0.049 ↓ 0.0 0 1

BitmapAnd (cost=8.61..8.61 rows=2 width=0) (actual time=0.049..0.049 rows=0 loops=1)

28. 0.027 0.027 ↑ 1.4 38 1

Bitmap Index Scan on hc_idx_internal_app_permissions__c_team__c (cost=0.00..3.87 rows=53 width=0) (actual time=0.027..0.027 rows=38 loops=1)

  • Index Cond: ((team__c)::text = (ip.team__c)::text)
29. 0.016 0.016 ↑ 1.2 23 1

Bitmap Index Scan on hc_idx_internal_app_permissions__c_user_profile__c (cost=0.00..4.48 rows=27 width=0) (actual time=0.016..0.016 rows=23 loops=1)

  • Index Cond: ((user_profile__c)::text = 'Supervisor'::text)
30. 0.024 0.024 ↑ 1.0 1 1

Index Scan using contact_idx_sfid on contact cooo (cost=0.56..8.58 rows=1 width=34) (actual time=0.024..0.024 rows=1 loops=1)

  • Index Cond: ((ipp.contact__c)::text = (sfid)::text)
31.          

SubPlan (forNested Loop Left Join)

32. 0.003 0.047 ↑ 1.0 1 1

Aggregate (cost=12.21..12.22 rows=1 width=32) (actual time=0.046..0.047 rows=1 loops=1)

33. 0.001 0.044 ↓ 0.0 0 1

Limit (cost=12.18..12.18 rows=2 width=27) (actual time=0.044..0.044 rows=0 loops=1)

34. 0.014 0.043 ↓ 0.0 0 1

Sort (cost=12.18..12.18 rows=2 width=27) (actual time=0.043..0.043 rows=0 loops=1)

  • Sort Key: app.createddate DESC
  • Sort Method: quicksort Memory: 25kB
35. 0.029 0.029 ↓ 0.0 0 1

Index Scan using appointment__c_idx_case__c on appointment__c app (cost=0.43..12.17 rows=2 width=27) (actual time=0.029..0.029 rows=0 loops=1)

  • Index Cond: ((case__c)::text = (qa.case__c)::text)