Calculate Campaign Engagements Scheduled Job is slowDescriptionThe Scheduled Job "Content Experiences: Calculate Campaign Engagements" can run extremely slowly for certain configurations. This is especially bad since OOB the job is scheduled to run every few minutes, meaning in the worst case the instance is running this job nearly 100% of the time and impacting the DB performance.Steps to Reproduce 1. Install Content Publishing/Content Experiences/Content Analytics2. Create around 300,000 test users, all active3. Create around 15-20 test campaigns, with audience = active users, leave it in draft for now. Tracking should be enabled4. Add content such as emails, todos, and banners with clickable buttons to the campaigns. Focus on the emails and todos since those create tracking records even without users visiting them5. Publish all the campaigns and run the scheduled jobs to process them. This will take a while6. Check that many records exist in sn_ca_campaign_item_user7. Now check how long it takes form the Content Experiences: Calculate Campaign Engagements to run (you can use gs.infos if needed, or check the translation log).Expectation: One run of the scheduled job should take less than 5 minutes, even with this loadObserved: One run is taking ~20-30 minutes.WorkaroundIf there are no records in "sn_cda_m2m_prof_country", that means that country based analytics tracking restrictions are not being used. In this case, the entire part of the code that is causing the performance issue can be commented out by following these steps as an admin: 1. Open the Script Include ca_Analytics 2. Find the function "_getCampaignViewCount" 3. Comment out these lines: var userId = item.campaign_user.user + '';if (this._isTrackingRestricted(campaign, userId)) continue; If "sn_cda_m2m_prof_country" is being used for its tracking, heavier customization will need to be done including caching improvements which will not be possible in the scope of this workaround, but will be provided in an update when this PRB is resolved.Related Problem: PRB1966031