explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SvT5

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 0.338 ↑ 2.0 1 1

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

2.          

CTE teamleadquery

3. 0.034 0.146 ↓ 6.0 6 1

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

  • Group Key: ip_1.team__c
4. 0.013 0.112 ↓ 8.0 8 1

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

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

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

6. 0.012 0.012 ↑ 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.007..0.012 rows=8 loops=1)

  • Index Cond: ((user_profile__c)::text = 'Team Lead'::text)
7. 0.080 0.080 ↑ 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.010..0.010 rows=1 loops=8)

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

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

9. 0.001 0.258 ↑ 1.0 1 1

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

  • Join Filter: ((tq.team__c)::text = (ip.team__c)::text)
  • Rows Removed by Join Filter: 5
10. 0.003 0.107 ↑ 1.0 1 1

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

11. 0.003 0.097 ↑ 1.0 1 1

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

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

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

13. 0.001 0.064 ↑ 1.0 1 1

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

14. 0.004 0.049 ↑ 1.0 1 1

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

15. 0.001 0.037 ↑ 1.0 1 1

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

16. 0.008 0.034 ↑ 1.0 1 1

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

17. 0.011 0.011 ↑ 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.010..0.011 rows=1 loops=1)

  • Index Cond: (id = 67513)
18. 0.015 0.015 ↑ 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.015..0.015 rows=1 loops=1)

  • Index Cond: ((qa.case__c)::text = (sfid)::text)
19. 0.002 0.002 ↓ 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.002..0.002 rows=0 loops=1)

  • Index Cond: ((sfid)::text = (qa.service_request_pop__c)::text)
20. 0.008 0.008 ↑ 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.008..0.008 rows=1 loops=1)

  • Index Cond: ((sfid)::text = (qa.case_account__c)::text)
21. 0.014 0.014 ↑ 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.014..0.014 rows=1 loops=1)

  • Index Cond: ((qa.case_property__c)::text = (sfid)::text)
22. 0.015 0.015 ↑ 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.015..0.015 rows=1 loops=1)

  • Index Cond: ((sfid)::text = (qa.qa_reviewer__c)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
23. 0.013 0.013 ↑ 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.013..0.013 rows=1 loops=1)

  • Index Cond: ((qa.property_consultant__c)::text = (sfid)::text)
24. 0.007 0.007 ↑ 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.007..0.007 rows=1 loops=1)

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

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

26. 0.004 0.024 ↑ 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.024..0.024 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.002 0.020 ↓ 0.0 0 1

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

28. 0.012 0.012 ↓ 1.3 70 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.012..0.012 rows=70 loops=1)

  • Index Cond: ((team__c)::text = (ip.team__c)::text)
29. 0.006 0.006 ↑ 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.006..0.006 rows=23 loops=1)

  • Index Cond: ((user_profile__c)::text = 'Supervisor'::text)
30. 0.009 0.009 ↑ 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.009..0.009 rows=1 loops=1)

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

SubPlan (forNested Loop Left Join)

32. 0.006 0.027 ↑ 1.0 1 1

Aggregate (cost=12.21..12.22 rows=1 width=32) (actual time=0.026..0.027 rows=1 loops=1)

33. 0.000 0.021 ↑ 2.0 1 1

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

34. 0.007 0.021 ↑ 2.0 1 1

Sort (cost=12.18..12.18 rows=2 width=27) (actual time=0.020..0.021 rows=1 loops=1)

  • Sort Key: app.createddate DESC
  • Sort Method: quicksort Memory: 25kB
35. 0.014 0.014 ↑ 2.0 1 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.013..0.014 rows=1 loops=1)

  • Index Cond: ((case__c)::text = (qa.case__c)::text)
Planning time : 4.603 ms
Execution time : 0.955 ms