The code change has been tested locally, and the expected query output has been tested on the production instance to confirm it avoids the query planning issue
Screenshots (if appropriate):
Documentation Changes
Checklist:
[ ] My change requires a change to the documentation.
[ ] I have included updates for the documentation accordingly.
Description
This materializes campaign contacts while preparing exports, to resolve an issue on some instances with query planning in production
Motivation and Context
See production issue reported here https://withtheranks.slack.com/archives/C0694QK8A3X/p1723067594475649?thread_ts=1723062179.129459&cid=C0694QK8A3X
How Has This Been Tested?
The code change has been tested locally, and the expected query output has been tested on the production instance to confirm it avoids the query planning issue
Screenshots (if appropriate):
Documentation Changes
Checklist: