explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3ZjA : cond in join

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 497.382 ↓ 0.0 0 1

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

2.          

CTE rankquery

3. 0.013 497.376 ↓ 0.0 0 1

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

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

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

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

Bitmap Heap Scan on "case" ca (cost=97,849.47..244,889.40 rows=4,805 width=76) (actual time=484.233..484.233 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.413 483.981 ↓ 0.0 0 1

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

7. 0.035 0.035 ↑ 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.035..0.035 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. 483.533 483.533 ↑ 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=483.533..483.533 rows=5,276,072 loops=1)

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

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

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

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

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

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

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

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

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

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

14. 497.378 497.378 ↓ 0.0 0 1

CTE Scan on rankquery ra (cost=635.31..642.30 rows=156 width=216) (actual time=497.378..497.378 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