explain.depesz.com

PostgreSQL's explain analyze made readable

Result: woad

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 0.933 ↑ 2.0 1 1

Nested Loop Left Join (cost=104.30..215.27 rows=2 width=1,825) (actual time=0.925..0.933 rows=1 loops=1)

2.          

CTE teamleadquery

3. 0.089 0.406 ↓ 6.0 6 1

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

  • Group Key: ip_1.team__c
4. 0.034 0.317 ↓ 8.0 8 1

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

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

Nested Loop (cost=0.84..91.72 rows=1 width=28) (actual time=0.061..0.283 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.016..0.029 rows=8 loops=1)

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

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

Nested Loop Left Join (cost=11.99..81.83 rows=2 width=1,367) (actual time=0.797..0.804 rows=1 loops=1)

9. 0.005 0.728 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.38..66.52 rows=1 width=1,361) (actual time=0.723..0.728 rows=1 loops=1)

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

Nested Loop Left Join (cost=3.38..66.48 rows=1 width=1,329) (actual time=0.301..0.306 rows=1 loops=1)

11. 0.009 0.279 ↑ 1.0 1 1

Nested Loop Left Join (cost=3.10..59.25 rows=1 width=1,335) (actual time=0.277..0.279 rows=1 loops=1)

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

Nested Loop (cost=2.54..50.66 rows=1 width=1,297) (actual time=0.231..0.233 rows=1 loops=1)

13. 0.005 0.187 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.98..42.08 rows=1 width=1,282) (actual time=0.185..0.187 rows=1 loops=1)

14. 0.005 0.143 ↑ 1.0 1 1

Nested Loop (cost=1.56..33.64 rows=1 width=1,276) (actual time=0.142..0.143 rows=1 loops=1)

15. 0.003 0.110 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.28..25.34 rows=1 width=1,272) (actual time=0.108..0.110 rows=1 loops=1)

16. 0.022 0.100 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.85..16.89 rows=1 width=1,184) (actual time=0.099..0.100 rows=1 loops=1)

17. 0.038 0.038 ↑ 1.0 1 1

Index Scan using qa_form__c_pkey on qa_form__c qa (cost=0.29..8.31 rows=1 width=802) (actual time=0.038..0.038 rows=1 loops=1)

  • Index Cond: (id = 65154)
18. 0.040 0.040 ↑ 1.0 1 1

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

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

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

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

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

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

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

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

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

26. 0.009 0.070 ↑ 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.069..0.070 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.008 0.061 ↓ 0.0 0 1

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

28. 0.033 0.033 ↓ 1.1 59 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.032..0.033 rows=59 loops=1)

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

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

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

SubPlan (forNested Loop Left Join)

32. 0.003 0.050 ↑ 1.0 1 1

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

33. 0.001 0.047 ↓ 0.0 0 1

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

34. 0.014 0.046 ↓ 0.0 0 1

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

  • Sort Key: app.createddate DESC
  • Sort Method: quicksort Memory: 25kB
35. 0.032 0.032 ↓ 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.032..0.032 rows=0 loops=1)

  • Index Cond: ((case__c)::text = (qa.case__c)::text)
Planning time : 14.702 ms
Execution time : 2.566 ms