explain.depesz.com

PostgreSQL's explain analyze made readable

Result: em2n

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 500.555 ↓ 100.0 100 1

Limit (cost=19,108.28..19,108.31 rows=1 width=1,150) (actual time=500.522..500.555 rows=100 loops=1)

2.          

CTE rankquery

3. 5.442 494.118 ↓ 1,711.0 1,711 1

GroupAggregate (cost=19,108.26..19,108.27 rows=1 width=104) (actual time=488.327..494.118 rows=1,711 loops=1)

  • Group Key: acc.name, pro.name
4. 24.226 488.676 ↓ 4,660.0 4,660 1

Sort (cost=19,108.26..19,108.26 rows=1 width=74) (actual time=488.319..488.676 rows=4,660 loops=1)

  • Sort Key: acc.name, pro.name
  • Sort Method: quicksort Memory: 791kB
5. 1.025 464.450 ↓ 4,660.0 4,660 1

Nested Loop (cost=696.48..19,108.26 rows=1 width=74) (actual time=65.401..464.450 rows=4,660 loops=1)

  • Join Filter: ((ca.accountid)::text = (acc.sfid)::text)
6. 5.051 430.805 ↓ 4,660.0 4,660 1

Nested Loop (cost=696.43..19,108.16 rows=1 width=89) (actual time=65.377..430.805 rows=4,660 loops=1)

7. 2.367 355.854 ↓ 4,660.0 4,660 1

Hash Join (cost=696.34..19,104.26 rows=1 width=64) (actual time=65.349..355.854 rows=4,660 loops=1)

  • Hash Cond: ((ca.property_consultant__c)::text = (con.sfid)::text)
8. 311.143 349.375 ↓ 3.3 4,739 1

Bitmap Heap Scan on "case" ca (cost=315.05..18,722.22 rows=1,424 width=83) (actual time=61.221..349.375 rows=4,739 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: 15599
  • Heap Blocks: exact=109924
9. 38.232 38.232 ↓ 23.5 221,271 1

Bitmap Index Scan on hc_idx_case_createddate (cost=0.00..314.98 rows=9,432 width=0) (actual time=38.232..38.232 rows=221,271 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))
10. 0.144 4.112 ↑ 2.1 702 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 51kB
11. 3.968 3.968 ↑ 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.039..3.968 rows=702 loops=1)

  • Index Cond: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
12. 69.900 69.900 ↑ 1.0 1 4,660

Index Scan using property__c_idx_sfid on property__c pro (cost=0.08..3.90 rows=1 width=63) (actual time=0.015..0.015 rows=1 loops=4,660)

  • Index Cond: ((sfid)::text = (ca.property_of_interest__c)::text)
  • Filter: ((ca.accountid)::text = (account__c)::text)
13. 32.620 32.620 ↑ 1.0 1 4,660

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

  • Index Cond: ((sfid)::text = (pro.account__c)::text)
14. 1.523 500.547 ↓ 100.0 100 1

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

15. 2.161 499.024 ↓ 1,711.0 1,711 1

GroupAggregate (cost=0.01..0.03 rows=1 width=918) (actual time=496.780..499.024 rows=1,711 loops=1)

  • Group Key: ra.accountname, ra.propertyname
16. 1.940 496.863 ↓ 1,711.0 1,711 1

Sort (cost=0.01..0.01 rows=1 width=750) (actual time=496.771..496.863 rows=1,711 loops=1)

  • Sort Key: ra.accountname, ra.propertyname
  • Sort Method: quicksort Memory: 293kB
17. 494.923 494.923 ↓ 1,711.0 1,711 1

CTE Scan on rankquery ra (cost=0.00..0.01 rows=1 width=750) (actual time=488.330..494.923 rows=1,711 loops=1)

Planning time : 3.505 ms
Execution time : 500.897 ms