explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gHXc

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 1,027.210 ↓ 100.0 100 1

Limit (cost=19,146.97..19,146.99 rows=1 width=1,150) (actual time=1,027.145..1,027.210 rows=100 loops=1)

2.          

CTE rankquery

3. 1.001 1,020.586 ↓ 1,711.0 1,711 1

WindowAgg (cost=19,146.94..19,146.96 rows=1 width=112) (actual time=1,020.224..1,020.586 rows=1,711 loops=1)

4. 5.792 1,019.585 ↓ 1,711.0 1,711 1

GroupAggregate (cost=19,146.94..19,146.96 rows=1 width=104) (actual time=1,013.305..1,019.585 rows=1,711 loops=1)

  • Group Key: acc.name, pro.name
5. 27.489 1,013.793 ↓ 4,663.0 4,663 1

Sort (cost=19,146.94..19,146.94 rows=1 width=74) (actual time=1,013.296..1,013.793 rows=4,663 loops=1)

  • Sort Key: acc.name, pro.name
  • Sort Method: quicksort Memory: 792kB
6. 1.887 986.304 ↓ 4,663.0 4,663 1

Nested Loop (cost=698.52..19,146.94 rows=1 width=74) (actual time=68.144..986.304 rows=4,663 loops=1)

  • Join Filter: ((ca.accountid)::text = (acc.sfid)::text)
7. 6.213 947.113 ↓ 4,663.0 4,663 1

Nested Loop (cost=698.47..19,146.85 rows=1 width=89) (actual time=68.126..947.113 rows=4,663 loops=1)

8. 3.228 861.629 ↓ 4,663.0 4,663 1

Hash Join (cost=698.38..19,142.95 rows=1 width=64) (actual time=68.076..861.629 rows=4,663 loops=1)

  • Hash Cond: ((ca.property_consultant__c)::text = (con.sfid)::text)
9. 817.360 853.892 ↓ 3.3 4,742 1

Bitmap Heap Scan on "case" ca (cost=317.09..18,760.90 rows=1,427 width=83) (actual time=63.551..853.892 rows=4,742 loops=1)

  • Recheck Cond: ((createddate >= '2019-05-13 13:43:54'::timestamp without time zone) AND (createddate < '2019-05-14 13:43:54'::timestamp without time zone))
  • Filter: ((reasons_for_not_setting_a_showing__c IS NOT NULL) AND ic_call_answered_by_ah__c AND ((guest_card_status__c)::text = 'Sent via Workflow'::text))
  • Rows Removed by Filter: 15658
  • Heap Blocks: exact=110252
10. 36.532 36.532 ↓ 23.5 221,838 1

Bitmap Index Scan on hc_idx_case_createddate (cost=0.00..317.01 rows=9,451 width=0) (actual time=36.532..36.532 rows=221,838 loops=1)

  • Index Cond: ((createddate >= '2019-05-13 13:43:54'::timestamp without time zone) AND (createddate < '2019-05-14 13:43:54'::timestamp without time zone))
11. 0.152 4.509 ↑ 2.1 702 1

Hash (cost=376.22..376.22 rows=1,451 width=19) (actual time=4.509..4.509 rows=702 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 51kB
12. 4.357 4.357 ↑ 2.1 702 1

Index Scan using hc_idx_contact_recordtypeid on contact con (cost=0.11..376.22 rows=1,451 width=19) (actual time=0.053..4.357 rows=702 loops=1)

  • Index Cond: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
13. 79.271 79.271 ↑ 1.0 1 4,663

Index Scan using property__c_idx_sfid on property__c pro (cost=0.08..3.89 rows=1 width=63) (actual time=0.017..0.017 rows=1 loops=4,663)

  • Index Cond: ((sfid)::text = (ca.property_of_interest__c)::text)
  • Filter: ((ca.accountid)::text = (account__c)::text)
14. 37.304 37.304 ↑ 1.0 1 4,663

Index Scan using account_idx_sfid on account acc (cost=0.06..0.09 rows=1 width=42) (actual time=0.008..0.008 rows=1 loops=4,663)

  • Index Cond: ((sfid)::text = (pro.account__c)::text)
15. 1.494 1,027.200 ↓ 100.0 100 1

WindowAgg (cost=0.01..0.03 rows=1 width=1,150) (actual time=1,027.144..1,027.200 rows=100 loops=1)

16. 2.230 1,025.706 ↓ 1,711.0 1,711 1

GroupAggregate (cost=0.01..0.03 rows=1 width=926) (actual time=1,023.390..1,025.706 rows=1,711 loops=1)

  • Group Key: ra.accountname, ra.propertyname, ra.total_count
17. 2.237 1,023.476 ↓ 1,711.0 1,711 1

Sort (cost=0.01..0.01 rows=1 width=758) (actual time=1,023.379..1,023.476 rows=1,711 loops=1)

  • Sort Key: ra.accountname, ra.propertyname, ra.total_count
  • Sort Method: quicksort Memory: 301kB
18. 1,021.239 1,021.239 ↓ 1,711.0 1,711 1

CTE Scan on rankquery ra (cost=0.00..0.01 rows=1 width=758) (actual time=1,020.226..1,021.239 rows=1,711 loops=1)