explain.depesz.com

PostgreSQL's explain analyze made readable

Result: j6Bb

Settings
# exclusive inclusive rows x rows loops node
1. 0.205 19,575.859 ↓ 227.0 227 1

WindowAgg (cost=5,436.76..5,436.81 rows=1 width=127) (actual time=19,575.728..19,575.859 rows=227 loops=1)

2. 5.485 19,575.654 ↓ 227.0 227 1

GroupAggregate (cost=5,436.76..5,436.80 rows=1 width=55) (actual time=19,569.273..19,575.654 rows=227 loops=1)

  • Group Key: co.sfid, ip.team__c, co.firstname, co.lastname
3. 28.226 19,570.169 ↓ 22,419.0 22,419 1

Sort (cost=5,436.76..5,436.77 rows=1 width=72) (actual time=19,569.265..19,570.169 rows=22,419 loops=1)

  • Sort Key: co.sfid, ip.team__c, co.firstname, co.lastname
  • Sort Method: quicksort Memory: 3,738kB
4. 6.980 19,541.943 ↓ 22,419.0 22,419 1

Nested Loop (cost=3,089.13..5,436.75 rows=1 width=72) (actual time=52.932..19,541.943 rows=22,419 loops=1)

5. 2.331 8.203 ↓ 330.0 330 1

Hash Join (cost=72.77..2,255.73 rows=1 width=66) (actual time=1.150..8.203 rows=330 loops=1)

  • Hash Cond: ((co.sfid)::text = (ip.contact__c)::text)
6. 4.882 4.882 ↑ 12.9 812 1

Index Scan using hc_idx_contact_recordtypeid on contact co (cost=0.56..2,131.13 rows=10,476 width=34) (actual time=0.080..4.882 rows=812 loops=1)

  • Index Cond: ((recordtypeid)::text = '0120H000001O7IWQA0'::text)
7. 0.185 0.990 ↑ 1.0 331 1

Hash (cost=68.00..68.00 rows=337 width=32) (actual time=0.990..0.990 rows=331 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 29kB
8. 0.805 0.805 ↑ 1.0 331 1

Seq Scan on internal_app_permissions__c ip (cost=0.00..68.00 rows=337 width=32) (actual time=0.018..0.805 rows=331 loops=1)

  • Filter: ((employment_status__c)::text = 'Active'::text)
  • Rows Removed by Filter: 455
9. 12,124.200 19,526.760 ↓ 34.0 68 330

Bitmap Heap Scan on "case" ca (cost=3,016.36..3,181.00 rows=2 width=44) (actual time=22.800..59.172 rows=68 loops=330)

  • Recheck Cond: (((property_consultant__c)::text = (co.sfid)::text) AND (createddate >= '2019-08-27 11:13:55'::timestamp without time zone) AND (createddate < '2019-09-26 11:13:55'::timestamp without time zone))
  • Filter: (ic_call_answered_by_ah__c AND (NOT COALESCE(resident_case__c, false)) AND ((status)::text <> 'Resident'::text) AND ((recordtypeid)::text = '012i0000000DVbcAAG'::text))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=22,477
10. 140.550 7,402.560 ↓ 0.0 0 330

BitmapAnd (cost=3,016.36..3,016.36 rows=43 width=0) (actual time=22.432..22.432 rows=0 loops=330)

11. 3,533.640 3,533.640 ↑ 1.0 4,984 330

Bitmap Index Scan on hc_idx_case_property_consultant__c (cost=0.00..95.45 rows=5,068 width=0) (actual time=10.708..10.708 rows=4,984 loops=330)

  • Index Cond: ((property_consultant__c)::text = (co.sfid)::text)
12. 3,728.370 3,728.370 ↑ 1.8 75,803 285

Bitmap Index Scan on hc_idx_case_createddate (cost=0.00..2,918.74 rows=139,031 width=0) (actual time=13.082..13.082 rows=75,803 loops=285)

  • Index Cond: ((createddate >= '2019-08-27 11:13:55'::timestamp without time zone) AND (createddate < '2019-09-26 11:13:55'::timestamp without time zone))
Planning time : 3.624 ms
Execution time : 19,576.115 ms