explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9F5a

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 30,409.081 ↑ 1.0 20 1

Limit (cost=429,590.80..429,591.95 rows=20 width=224) (actual time=30,409.068..30,409.081 rows=20 loops=1)

2.          

CTE rankquery

3. 25.662 30,299.281 ↓ 5.5 29,699 1

Hash Join (cost=218,444.24..427,447.70 rows=5,386 width=76) (actual time=987.890..30,299.281 rows=29,699 loops=1)

  • Hash Cond: ((ca.accountid)::text = (a.sfid)::text)
4. 29,290.926 30,267.992 ↓ 5.0 29,776 1

Bitmap Heap Scan on "case" ca (cost=217,886.55..426,874.21 rows=6,013 width=76) (actual time=982.251..30,267.992 rows=29,776 loops=1)

  • Recheck Cond: ((createddate >= '2019-04-10 07:00:00'::timestamp without time zone) AND (createddate < '2019-05-11 07:00:00'::timestamp without time zone) AND ((status)::text = ANY ('{Inquiry,"Showing Set"}'::text[])))
  • Rows Removed by Index Recheck: 883452
  • Filter: (ic_call_answered_by_ah__c AND (NOT realtor_inquiry__c) AND ((guest_card_status__c)::text <> 'In Progress'::text) AND (NULLIF((property_consultant__c)::text, ''::text) IS NOT NULL) AND ((ic_skill__c)::text <> ALL ('{"Spanish Transla (...)
  • Rows Removed by Filter: 93162
  • Heap Blocks: exact=23297 lossy=196326
5. 13.601 977.066 ↓ 0.0 0 1

BitmapAnd (cost=217,886.55..217,886.55 rows=59,008 width=0) (actual time=977.066..977.066 rows=0 loops=1)

6. 71.570 71.570 ↓ 1.2 345,964 1

Bitmap Index Scan on hc_idx_case_createddate (cost=0.00..6,284.79 rows=299,635 width=0) (actual time=71.570..71.570 rows=345,964 loops=1)

  • Index Cond: ((createddate >= '2019-04-10 07:00:00'::timestamp without time zone) AND (createddate < '2019-05-11 07:00:00'::timestamp without time zone))
7. 430.692 430.692 ↑ 1.0 5,619,964 1

Bitmap Index Scan on hc_idx_case_ic_call_answered_by_ah__c (cost=0.00..104,430.73 rows=5,654,172 width=0) (actual time=430.692..430.692 rows=5,619,964 loops=1)

  • Index Cond: (ic_call_answered_by_ah__c = true)
8. 461.203 461.203 ↓ 1.0 5,781,397 1

Bitmap Index Scan on hc_idx_case_status (cost=0.00..107,166.04 rows=5,780,422 width=0) (actual time=461.203..461.203 rows=5,781,397 loops=1)

  • Index Cond: ((status)::text = ANY ('{Inquiry,"Showing Set"}'::text[]))
9. 0.916 5.627 ↓ 1.0 2,555 1

Hash (cost=526.61..526.61 rows=2,486 width=19) (actual time=5.627..5.627 rows=2,555 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 160kB
10. 4.711 4.711 ↓ 1.0 2,555 1

Seq Scan on account a (cost=0.00..526.61 rows=2,486 width=19) (actual time=0.012..4.711 rows=2,555 loops=1)

  • Filter: ((NOT test_account__c) AND (NOT exclude_from_dashboards__c))
  • Rows Removed by Filter: 106
11. 28.115 30,409.075 ↑ 134.7 20 1

WindowAgg (cost=2,143.10..2,297.95 rows=2,693 width=224) (actual time=30,409.066..30,409.075 rows=20 loops=1)

12. 30,375.765 30,380.960 ↓ 10.7 28,791 1

CTE Scan on rankquery ra (cost=2,143.10..2,264.29 rows=2,693 width=216) (actual time=1,004.807..30,380.960 rows=28,791 loops=1)

  • Filter: (NOT (hashed SubPlan 2))
  • Rows Removed by Filter: 908
13.          

SubPlan (forCTE Scan)

14. 5.195 5.195 ↓ 1.0 55,260 1

Index Only Scan using hc_idx_qa_form__c_case__c on qa_form__c qa (cost=0.42..2,005.55 rows=55,022 width=19) (actual time=0.028..5.195 rows=55,260 loops=1)

  • Index Cond: (case__c IS NOT NULL)
  • Heap Fetches: 526