explain.depesz.com

PostgreSQL's explain analyze made readable

Result: u8HI

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 1,685.490 ↓ 20.0 20 1

Limit (cost=20,969.64..20,969.64 rows=1 width=1,476) (actual time=1,685.486..1,685.490 rows=20 loops=1)

2.          

CTE rankquery

3. 9.068 1,679.249 ↓ 3,949.0 3,949 1

GroupAggregate (cost=20,969.62..20,969.63 rows=1 width=104) (actual time=1,669.060..1,679.249 rows=3,949 loops=1)

  • Group Key: acc.name, pro.name, s.source_type__c, ca.origin
4. 62.266 1,670.181 ↓ 7,974.0 7,974 1

Sort (cost=20,969.62..20,969.62 rows=1 width=81) (actual time=1,669.043..1,670.181 rows=7,974 loops=1)

  • Sort Key: acc.name, pro.name, s.source_type__c, ca.origin
  • Sort Method: quicksort Memory: 1286kB
5. 5.770 1,607.915 ↓ 7,974.0 7,974 1

Nested Loop (cost=1,317.27..20,969.61 rows=1 width=81) (actual time=107.109..1,607.915 rows=7,974 loops=1)

  • Join Filter: ((ca.accountid)::text = (acc.sfid)::text)
6. 7.253 1,530.379 ↓ 7,974.0 7,974 1

Gather (cost=1,317.21..20,969.52 rows=1 width=115) (actual time=107.070..1,530.379 rows=7,974 loops=1)

  • Workers Planned: 3
  • Workers Launched: 0
7. 163.274 1,523.126 ↓ 7,974.0 7,974 1

Nested Loop (cost=317.21..19,969.42 rows=1 width=115) (actual time=105.623..1,523.126 rows=7,974 loops=1)

8. 141.623 1,359.833 ↓ 1,661.0 8,305 1

Nested Loop (cost=317.13..19,949.72 rows=5 width=90) (actual time=105.568..1,359.833 rows=8,305 loops=1)

9. 1,148.886 1,218.194 ↓ 23.3 8,308 1

Parallel Bitmap Heap Scan on "case" ca (cost=317.05..18,713.51 rows=356 width=74) (actual time=105.507..1,218.194 rows=8,308 loops=1)

  • Recheck Cond: ((createddate >= '2019-05-13 12:32:16'::timestamp without time zone) AND (createddate < '2019-05-14 12:32:16'::timestamp without time zone))
  • Filter: (ic_call_answered_by_ah__c AND (pulled_from_external_system__c IS NULL) AND ((recordtypeid)::text = '012i0000000DVbcAAG'::text) AND ((status)::text = ANY ('{Inquiry,"Showing Set",Closed}'::text[])) AND (...)
  • Rows Removed by Filter: 12492
  • Heap Blocks: exact=111883
10. 69.308 69.308 ↓ 23.9 225,829 1

Bitmap Index Scan on hc_idx_case_createddate (cost=0.00..316.99 rows=9,439 width=0) (actual time=69.308..69.308 rows=225,829 loops=1)

  • Index Cond: ((createddate >= '2019-05-13 12:32:16'::timestamp without time zone) AND (createddate < '2019-05-14 12:32:16'::timestamp without time zone))
11. 0.016 0.016 ↑ 1.0 1 8,308

Index Scan using source__c_idx_sfid on source__c s (cost=0.08..3.47 rows=1 width=54) (actual time=0.016..0.016 rows=1 loops=8,308)

  • Index Cond: ((sfid)::text = (ca.ad_source2__c)::text)
  • Filter: ((source_type__c IS NOT NULL) AND ((ca.accountid)::text = (account__c)::text))
  • Rows Removed by Filter: 0
12. 0.019 0.019 ↑ 1.0 1 8,305

Index Scan using property__c_idx_sfid on property__c pro (cost=0.08..3.94 rows=1 width=63) (actual time=0.019..0.019 rows=1 loops=8,305)

  • Index Cond: ((sfid)::text = (ca.property_of_interest__c)::text)
  • Filter: ((ca.accountid)::text = (account__c)::text)
13. 71.766 71.766 ↑ 1.0 1 7,974

Index Scan using account_idx_sfid on account acc (cost=0.06..0.09 rows=1 width=42) (actual time=0.009..0.009 rows=1 loops=7,974)

  • Index Cond: ((sfid)::text = (pro.account__c)::text)
14. 1.424 1,685.485 ↓ 20.0 20 1

Sort (cost=0.01..0.01 rows=1 width=1,476) (actual time=1,685.484..1,685.485 rows=20 loops=1)

  • Sort Key: ra.accountname, ra.propertyname, ra.sourcetype, ra.mediatype
  • Sort Method: top-N heapsort Memory: 30kB
15. 2.956 1,684.061 ↓ 3,949.0 3,949 1

WindowAgg (cost=0.00..0.01 rows=1 width=1,476) (actual time=1,683.047..1,684.061 rows=3,949 loops=1)

16. 1,681.105 1,681.105 ↓ 3,949.0 3,949 1

CTE Scan on rankquery ra (cost=0.00..0.01 rows=1 width=1,340) (actual time=1,669.065..1,681.105 rows=3,949 loops=1)