explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7c2

Settings
# exclusive inclusive rows x rows loops node
1. 2.733 19,192.158 ↓ 1,900.0 1,900 1

Sort (cost=3,387.32..3,387.32 rows=1 width=521) (actual time=19,192.059..19,192.158 rows=1,900 loops=1)

  • Sort Key: qa.qa_form_created_date__c DESC, qa.id DESC
  • Sort Method: quicksort Memory: 568kB
2. 7.302 19,189.425 ↓ 1,900.0 1,900 1

WindowAgg (cost=137.99..3,387.32 rows=1 width=521) (actual time=19,185.518..19,189.425 rows=1,900 loops=1)

3. 2.309 19,182.123 ↓ 1,900.0 1,900 1

Nested Loop Left Join (cost=137.99..3,387.31 rows=1 width=321) (actual time=171.002..19,182.123 rows=1,900 loops=1)

4. 236.033 19,157.014 ↓ 1,900.0 1,900 1

Nested Loop Left Join (cost=137.88..3,383.19 rows=1 width=325) (actual time=170.952..19,157.014 rows=1,900 loops=1)

  • Filter: (((c.createddate >= '2019-08-12 19:11:00'::timestamp without time zone) AND (c.createddate < '2019-08-13 19:11:00'::timestamp without time zone)) OR ((sr.createddate >= '2019-08-12 19:11:00'::timestamp without time zone) AND (sr (...)
  • Rows Removed by Filter: 341966
5. 425.676 17,889.383 ↓ 1,868.8 343,866 1

Nested Loop Left Join (cost=137.77..2,997.83 rows=184 width=268) (actual time=0.837..17,889.383 rows=343,866 loops=1)

6. 995.703 10,586.387 ↓ 1,868.8 343,866 1

Nested Loop Left Join (cost=137.66..2,396.12 rows=184 width=201) (actual time=0.787..10,586.387 rows=343,866 loops=1)

  • Join Filter: ((ip.team__c)::text = (ipp1.team__c)::text)
  • Rows Removed by Join Filter: 7911471
7. 130.546 9,246.818 ↓ 4,408.5 343,866 1

Nested Loop (cost=137.60..2,362.26 rows=78 width=195) (actual time=0.763..9,246.818 rows=343,866 loops=1)

8. 237.435 4,302.092 ↓ 4,408.6 343,870 1

Nested Loop (cost=137.52..2,259.28 rows=78 width=189) (actual time=0.722..4,302.092 rows=343,870 loops=1)

9. 250.708 1,657.567 ↓ 4,408.6 343,870 1

Nested Loop Left Join (cost=137.46..2,253.09 rows=78 width=185) (actual time=0.696..1,657.567 rows=343,870 loops=1)

  • Filter: (((ipq.employment_status__c)::text = 'Active'::text) OR ((ipq.employment_status__c)::text = ''::text) OR (ipq.employment_status__c IS NULL))
  • Rows Removed by Filter: 68
10. 253.684 1,406.859 ↓ 2,047.2 343,938 1

Nested Loop Left Join (cost=137.41..2,233.46 rows=168 width=204) (actual time=0.691..1,406.859 rows=343,938 loops=1)

11. 82.043 1,153.175 ↓ 2,047.2 343,938 1

Nested Loop (cost=137.29..1,754.89 rows=168 width=178) (actual time=0.685..1,153.175 rows=343,938 loops=1)

12. 1.353 6.222 ↓ 770.0 770 1

Hash Join (cost=137.21..1,733.11 rows=1 width=66) (actual time=0.656..6.222 rows=770 loops=1)

  • Hash Cond: ((cp.sfid)::text = (ip.contact__c)::text)
13. 4.278 4.278 ↑ 6.7 796 1

Index Scan using hc_idx_contact_recordtypeid on contact cp (cost=0.11..1,590.65 rows=5,366 width=34) (actual time=0.038..4.278 rows=796 loops=1)

  • Index Cond: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
14. 0.171 0.591 ↑ 1.2 771 1

Hash (cost=133.81..133.81 rows=938 width=32) (actual time=0.591..0.591 rows=771 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
15. 0.420 0.420 ↑ 1.2 772 1

Seq Scan on internal_app_permissions__c ip (cost=0.00..133.81 rows=938 width=32) (actual time=0.006..0.420 rows=772 loops=1)

16. 1,064.910 1,064.910 ↑ 1.4 447 770

Index Scan using hc_idx_qa_form__c_property_consultant__c on qa_form__c qa (cost=0.08..19.95 rows=611 width=169) (actual time=0.086..1.383 rows=447 loops=770)

  • Index Cond: (((property_consultant__c)::text = (cp.sfid)::text) AND (property_consultant__c IS NOT NULL))
  • Filter: ((NOT dismiss_from_qa__c) AND (((shop_status__c)::text = 'Closed-Queued'::text) OR ((shop_status__c)::text = 'Closed-In Progress'::text) OR ((shop_status__c)::text = 'Closed-Comple (...)
  • Rows Removed by Filter: 61
17. 0.000 0.000 ↓ 0.0 0 343,938

Index Scan using contact_idx_sfid on contact cq (cost=0.11..2.85 rows=1 width=26) (actual time=0.000..0.000 rows=0 loops=343,938)

  • Index Cond: ((qa.qa_reviewer__c)::text = (sfid)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
18. 0.000 0.000 ↓ 0.0 0 343,938

Index Scan using hc_idx_internal_app_permissions__c_contact__c on internal_app_permissions__c ipq (cost=0.06..0.11 rows=1 width=27) (actual time=0.000..0.000 rows=0 loops=343,938)

  • Index Cond: ((contact__c)::text = (cq.sfid)::text)
19. 2,407.090 2,407.090 ↑ 1.0 1 343,870

Index Scan using account_idx_sfid on account acc (cost=0.06..0.08 rows=1 width=42) (actual time=0.007..0.007 rows=1 loops=343,870)

  • Index Cond: ((sfid)::text = (qa.case_account__c)::text)
20. 4,814.180 4,814.180 ↑ 1.0 1 343,870

Index Scan using property__c_idx_sfid on property__c pr (cost=0.08..1.32 rows=1 width=44) (actual time=0.014..0.014 rows=1 loops=343,870)

  • Index Cond: ((sfid)::text = (qa.case_property__c)::text)
21. 343.836 343.866 ↑ 1.2 24 343,866

Materialize (cost=0.06..24.82 rows=29 width=32) (actual time=0.000..0.001 rows=24 loops=343,866)

22. 0.030 0.030 ↑ 1.2 24 1

Index Scan using hc_idx_internal_app_permissions__c_user_profile__c on internal_app_permissions__c ipp1 (cost=0.06..24.79 rows=29 width=32) (actual time=0.011..0.030 rows=24 loops=1)

  • Index Cond: ((user_profile__c)::text = 'Supervisor'::text)
23. 6,877.320 6,877.320 ↑ 1.0 1 343,866

Index Scan using hcu_idx_case_sfid on "case" c (cost=0.11..3.27 rows=1 width=67) (actual time=0.020..0.020 rows=1 loops=343,866)

  • Index Cond: ((qa.case__c)::text = (sfid)::text)
24. 1,031.598 1,031.598 ↓ 0.0 0 343,866

Index Scan using service_request1__c_idx_sfid on service_request1__c sr (cost=0.11..2.09 rows=1 width=57) (actual time=0.003..0.003 rows=0 loops=343,866)

  • Index Cond: ((qa.service_request_pop__c)::text = (sfid)::text)
25. 22.800 22.800 ↑ 1.0 1 1,900

Index Scan using contact_idx_sfid on contact coo (cost=0.11..4.12 rows=1 width=34) (actual time=0.012..0.012 rows=1 loops=1,900)

  • Index Cond: ((ipp1.contact__c)::text = (sfid)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
Planning time : 11.528 ms
Execution time : 19,192.837 ms