explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UnqP : Old Query

Settings
# exclusive inclusive rows x rows loops node
1. 0.161 10.678 ↓ 69.0 69 1

Sort (cost=231.43..231.44 rows=1 width=581) (actual time=10.672..10.678 rows=69 loops=1)

  • Sort Key: qa.qa_form_created_date__c DESC, qa.id DESC
  • Sort Method: quicksort Memory: 43kB
2. 0.574 10.517 ↓ 69.0 69 1

WindowAgg (cost=54.30..231.42 rows=1 width=581) (actual time=10.094..10.517 rows=69 loops=1)

3. 0.124 9.943 ↓ 69.0 69 1

Nested Loop Left Join (cost=54.30..231.38 rows=1 width=329) (actual time=0.675..9.943 rows=69 loops=1)

4. 0.088 9.750 ↓ 69.0 69 1

Nested Loop (cost=53.87..222.93 rows=1 width=272) (actual time=0.671..9.750 rows=69 loops=1)

  • Join Filter: ((qa.property_consultant__c)::text = (ip.contact__c)::text)
5. 0.071 8.742 ↓ 92.0 92 1

Nested Loop Left Join (cost=53.60..215.91 rows=1 width=310) (actual time=0.661..8.742 rows=92 loops=1)

  • Filter: (((ipq.employment_status__c)::text = 'Active'::text) OR ((COALESCE(ipq.employment_status__c, ''::character varying))::text = ''::text))
6. 0.121 8.579 ↓ 92.0 92 1

Nested Loop Left Join (cost=53.32..208.90 rows=1 width=329) (actual time=0.649..8.579 rows=92 loops=1)

7. 0.523 8.366 ↓ 92.0 92 1

Nested Loop Left Join (cost=52.77..200.32 rows=1 width=303) (actual time=0.621..8.366 rows=92 loops=1)

8. 0.111 6.371 ↓ 92.0 92 1

Nested Loop Left Join (cost=52.35..191.88 rows=1 width=296) (actual time=0.588..6.371 rows=92 loops=1)

9. 0.104 5.340 ↓ 92.0 92 1

Nested Loop Left Join (cost=52.07..183.98 rows=1 width=292) (actual time=0.572..5.340 rows=92 loops=1)

10. 0.236 2.936 ↓ 92.0 92 1

Nested Loop (cost=51.51..175.40 rows=1 width=227) (actual time=0.532..2.936 rows=92 loops=1)

11. 0.109 0.584 ↓ 9.2 92 1

Bitmap Heap Scan on qa_form__c qa (cost=50.95..89.62 rows=10 width=193) (actual time=0.491..0.584 rows=92 loops=1)

  • Recheck Cond: ((qa_form_created_date__c >= '2018-12-08 20:24:09'::timestamp without time zone) AND (qa_form_created_date__c < '2019-01-07 20:24:09'::timestamp without time zone) AND ((shop_statu (...)
  • Heap Blocks: exact=38
12. 0.010 0.475 ↓ 0.0 0 1

BitmapAnd (cost=50.95..50.95 rows=10 width=0) (actual time=0.475..0.475 rows=0 loops=1)

13. 0.035 0.035 ↑ 1.1 112 1

Bitmap Index Scan on hc_idx_qa_form__c_qa_form_created_date__c (cost=0.00..5.52 rows=123 width=0) (actual time=0.035..0.035 rows=112 loops=1)

  • Index Cond: ((qa_form_created_date__c >= '2018-12-08 20:24:09'::timestamp without time zone) AND (qa_form_created_date__c < '2019-01-07 20:24:09'::timestamp without time zone))
14. 0.430 0.430 ↓ 1.1 1,766 1

Bitmap Index Scan on hc_idx_qa_form__c_shop_status__c (cost=0.00..45.18 rows=1,679 width=0) (actual time=0.430..0.430 rows=1,766 loops=1)

  • Index Cond: ((shop_status__c)::text = ANY ('{Queued,"In Progress"}'::text[]))
15. 2.116 2.116 ↑ 1.0 1 92

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

  • Index Cond: ((sfid)::text = (qa.property_consultant__c)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
16. 2.300 2.300 ↑ 1.0 1 92

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

  • Index Cond: ((qa.case__c)::text = (sfid)::text)
17. 0.920 0.920 ↑ 1.0 1 92

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

  • Index Cond: ((qa.case_account__c)::text = (sfid)::text)
18. 1.472 1.472 ↑ 1.0 1 92

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

  • Index Cond: ((qa.case_property__c)::text = (sfid)::text)
19. 0.092 0.092 ↓ 0.0 0 92

Index Scan using contact_idx_sfid on contact cq (cost=0.56..8.58 rows=1 width=26) (actual time=0.001..0.001 rows=0 loops=92)

  • Index Cond: ((qa.qa_reviewer__c)::text = (sfid)::text)
  • Filter: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
20. 0.092 0.092 ↓ 0.0 0 92

Index Scan using hc_idx_internal_app_permissions__c_contact__c on internal_app_permissions__c ipq (cost=0.27..7.00 rows=1 width=26) (actual time=0.001..0.001 rows=0 loops=92)

  • Index Cond: ((contact__c)::text = (cq.sfid)::text)
21. 0.920 0.920 ↑ 1.0 1 92

Index Scan using hc_idx_internal_app_permissions__c_contact__c on internal_app_permissions__c ip (cost=0.27..7.00 rows=1 width=19) (actual time=0.010..0.010 rows=1 loops=92)

  • Index Cond: ((contact__c)::text = (cp.sfid)::text)
  • Filter: ((employment_status__c)::text = 'Active'::text)
  • Rows Removed by Filter: 0
22. 0.069 0.069 ↓ 0.0 0 69

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

  • Index Cond: ((qa.service_request_pop__c)::text = (sfid)::text)