explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MYPf

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 0.295 ↑ 2.0 1 1

Hash Left Join (cost=103.76..181.96 rows=2 width=4,065) (actual time=0.293..0.295 rows=1 loops=1)

  • Hash Cond: ((ip.team__c)::text = (tq.team__c)::text)
2.          

CTE teamleadquery

3. 0.027 0.135 ↓ 6.0 6 1

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

  • Group Key: ip_1.team__c
4. 0.012 0.108 ↓ 8.0 8 1

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

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

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

6. 0.010 0.010 ↑ 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.005..0.010 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 (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.002 0.133 ↑ 2.0 1 1

Nested Loop Left Join (cost=11.97..90.13 rows=2 width=3,882) (actual time=0.130..0.133 rows=1 loops=1)

9. 0.001 0.118 ↑ 2.0 1 1

Nested Loop Left Join (cost=11.41..72.97 rows=2 width=3,886) (actual time=0.116..0.118 rows=1 loops=1)

10. 0.002 0.093 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.82..57.69 rows=1 width=3,867) (actual time=0.091..0.093 rows=1 loops=1)

11. 0.004 0.083 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.54..50.66 rows=1 width=3,873) (actual time=0.082..0.083 rows=1 loops=1)

12. 0.002 0.067 ↑ 1.0 1 1

Nested Loop (cost=1.98..42.08 rows=1 width=3,816) (actual time=0.066..0.067 rows=1 loops=1)

13. 0.002 0.052 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.42..33.50 rows=1 width=3,820) (actual time=0.051..0.052 rows=1 loops=1)

14. 0.001 0.038 ↑ 1.0 1 1

Nested Loop (cost=1.00..25.06 rows=1 width=3,814) (actual time=0.038..0.038 rows=1 loops=1)

15. 0.007 0.029 ↑ 1.0 1 1

Nested Loop (cost=0.72..16.76 rows=1 width=3,810) (actual time=0.028..0.029 rows=1 loops=1)

16. 0.008 0.008 ↑ 1.0 1 1

Index Scan using qa_form__c_pkey on qa_form__c qa (cost=0.29..8.31 rows=1 width=3,620) (actual time=0.008..0.008 rows=1 loops=1)

  • Index Cond: (id = 71313)
17. 0.014 0.014 ↑ 1.0 1 1

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

  • Index Cond: ((sfid)::text = (qa.service_request_pop__c)::text)
18. 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)
19. 0.012 0.012 ↑ 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.012..0.012 rows=1 loops=1)

  • Index Cond: ((qa.case_property__c)::text = (sfid)::text)
20. 0.013 0.013 ↑ 1.0 1 1

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

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

  • Index Cond: ((qa.property_consultant__c)::text = (sfid)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
22. 0.008 0.008 ↑ 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.01 rows=1 width=32) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: ((contact__c)::text = (coo.sfid)::text)
23. 0.004 0.024 ↑ 2.0 1 1

Bitmap Heap Scan on internal_app_permissions__c ipp (cost=8.59..15.27 rows=2 width=32) (actual time=0.023..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
24. 0.003 0.020 ↓ 0.0 0 1

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

25. 0.010 0.010 ↓ 1.1 59 1

Bitmap Index Scan on hc_idx_internal_app_permissions__c_team__c (cost=0.00..3.87 rows=52 width=0) (actual time=0.010..0.010 rows=59 loops=1)

  • Index Cond: ((team__c)::text = (ip.team__c)::text)
26. 0.007 0.007 ↑ 1.1 23 1

Bitmap Index Scan on hc_idx_internal_app_permissions__c_user_profile__c (cost=0.00..4.47 rows=26 width=0) (actual time=0.007..0.007 rows=23 loops=1)

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

  • Index Cond: ((ipp.contact__c)::text = (sfid)::text)
28. 0.004 0.143 ↓ 5.0 5 1

Hash (cost=0.02..0.02 rows=1 width=548) (actual time=0.143..0.143 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
29. 0.139 0.139 ↓ 6.0 6 1

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