explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dk8H : cond in where clause

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 413.501 ↓ 0.0 0 1

Limit (cost=246,146.79..246,147.93 rows=20 width=224) (actual time=413.501..413.501 rows=0 loops=1)

2.          

CTE rankquery

3. 0.004 413.497 ↓ 0.0 0 1

Hash Join (cost=98,445.66..245,511.48 rows=311 width=76) (actual time=413.497..413.497 rows=0 loops=1)

  • Hash Cond: ((ca.accountid)::text = (a.sfid)::text)
4. 0.005 411.406 ↓ 0.0 0 1

Hash Join (cost=97,907.35..244,968.78 rows=348 width=76) (actual time=411.406..411.406 rows=0 loops=1)

  • Hash Cond: ((ca.property_consultant__c)::text = (ip.contact__c)::text)
5. 0.248 411.268 ↓ 0.0 0 1

Bitmap Heap Scan on "case" ca (cost=97,849.47..244,889.40 rows=4,805 width=76) (actual time=411.268..411.268 rows=0 loops=1)

  • Recheck Cond: ((createddate >= '2018-12-08 08:00:00'::timestamp without time zone) AND (createddate < '2019-01-09 08:00:00'::timestamp without time zone) AND ((status)::text = ANY ('{Inquiry,"Showing Set"}'::text[])))
  • Rows Removed by Index Recheck: 16
  • Filter: (ic_call_answered_by_ah__c AND (NOT realtor_inquiry__c) AND ((guest_card_status__c)::text <> 'In Progress'::text) AND ((ic_skill__c)::text <> 'Spanish Translator'::text) AND ((origin)::text = ANY ('{Phone,Email,Chat}'::text[]) (...)
  • Rows Removed by Filter: 70
  • Heap Blocks: exact=66
6. 0.407 411.020 ↓ 0.0 0 1

BitmapAnd (cost=97,849.47..97,849.47 rows=40,961 width=0) (actual time=411.020..411.020 rows=0 loops=1)

7. 0.012 0.012 ↑ 903.7 94 1

Bitmap Index Scan on hc_idx_case_createddate (cost=0.00..1,781.89 rows=84,946 width=0) (actual time=0.012..0.012 rows=94 loops=1)

  • Index Cond: ((createddate >= '2018-12-08 08:00:00'::timestamp without time zone) AND (createddate < '2019-01-09 08:00:00'::timestamp without time zone))
8. 410.601 410.601 ↑ 1.0 5,276,072 1

Bitmap Index Scan on hc_idx_case_status (cost=0.00..96,064.92 rows=5,298,140 width=0) (actual time=410.601..410.601 rows=5,276,072 loops=1)

  • Index Cond: ((status)::text = ANY ('{Inquiry,"Showing Set"}'::text[]))
9. 0.034 0.133 ↑ 1.0 244 1

Hash (cost=54.84..54.84 rows=244 width=19) (actual time=0.133..0.133 rows=244 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
10. 0.099 0.099 ↑ 1.0 244 1

Seq Scan on internal_app_permissions__c ip (cost=0.00..54.84 rows=244 width=19) (actual time=0.002..0.099 rows=244 loops=1)

  • Filter: ((employment_status__c)::text = 'Active'::text)
  • Rows Removed by Filter: 223
11. 0.330 2.087 ↓ 1.0 2,496 1

Hash (cost=507.93..507.93 rows=2,430 width=19) (actual time=2.087..2.087 rows=2,496 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 157kB
12. 1.757 1.757 ↓ 1.0 2,496 1

Seq Scan on account a (cost=0.00..507.93 rows=2,430 width=19) (actual time=0.004..1.757 rows=2,496 loops=1)

  • Filter: ((NOT test_account__c) AND (NOT exclude_from_dashboards__c))
  • Rows Removed by Filter: 97
13. 0.002 413.500 ↓ 0.0 0 1

WindowAgg (cost=635.31..644.25 rows=156 width=224) (actual time=413.500..413.500 rows=0 loops=1)

14. 413.498 413.498 ↓ 0.0 0 1

CTE Scan on rankquery ra (cost=635.31..642.30 rows=156 width=216) (actual time=413.498..413.498 rows=0 loops=1)

  • Filter: (NOT (hashed SubPlan 2))
15.          

SubPlan (forCTE Scan)

16. 0.000 0.000 ↓ 0.0 0

Index Only Scan using hc_idx_qa_form__c_case__c on qa_form__c qa (cost=0.29..596.43 rows=15,551 width=19) (never executed)

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