When SQL caches a plan for one specific parameter, other queries become slow.
Most people use OPTION RECOMPILE.
BUT the REAL fix?
✔ Create an optimized local variable
DECLARE @local INT = @UserId; SELECT ... WHERE UserId = @local;
SQL can no longer sniff the parameter → balanced plan for all users.
