Hey. Regarding your questions:
1. Is my concern possible? Yes, it is. SQL Server uses a cost-based optimizer, which means it picks the plan with the lowest estimated cost based on several factors:
CPU cost: processing requirements
I/O cost: disk and memory usage
Row cardinality: number of rows estimated per step
Memory usage: intermediate memory requirements
So, even if a parallel plan performs worse in practice, SQL Server may choose it during recompilation if its estimated cost is lower than a serial alternative.
2. How can I avoid it (besides plan guides)? If you have time, you could try to refactor the query or adjust indexes to encourage a more efficient serial plan. Reducing estimated row counts or avoiding scans can help.
But for a quick and reliable solution, I’d recommend using OPTION (MAXDOP 1)
. This forces serial execution and avoids plan regressions during recompilation. Docs here.
Another option, though broader in scope, is to increase the “cost threshold for parallelism” at the server level. The default is 5, but raising it makes parallel plans less likely overall. Be aware this affects all queries on the instance. Docs here.
Hope this helps.