You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 23, 2017. It is now read-only.
The parameter sizes on string parameters are variable based on the length of the string that is being sent to SQL. For instance, if I perform a dynamic query with a string parameter, the field definition that is added to the SQL string will be the actual length of the string.
Because of this behavior, a procedure plan will be created and cached for every possible length of the string, and every combination when more than one parameter is sent. This could be argued as intended behavior so that the plan cache is accurate to the length of string being queried. It could equally be argued that it bloats the cache, requires a compilation per combination of string length, and creates a good potential for a corrupt plan that hits on 11 character length but not 10 characters.