Mistake: fixing a slow reporting query with a permanent MAXDOP hint. A high degree of parallelism can hurt that query and competing workloads, while SQL Server 2022 can evaluate execution history and adjust DOP automatically. section 10.6
The MarketingArchive reporting query
A reporting query runs with MAXDOP 16 and harms its own execution time and other queries. Adding a MAXDOP 8 hint seems reasonable, but it fixes one observed condition instead of adapting to later executions. Enable Query Store, turn on DOP feedback, and review the feedback settings. section 10.6
Apply these rules:
- Prefer DOP feedback over a fixed query hint when running SQL Server 2022 and the query's best parallelism may vary. section 10.6
- Remember that DOP feedback is disabled by default, unlike the other stated query feedback mechanisms. section 10.14 section 10.6
- Use execution history and statistics to let SQL Server continuously evaluate the DOP used in the query plan. section 10.6
