Yes, oversizing "just in case" can lead to performance issues, namely memory grants that are too high because they are based on the assumption that every value is half-populated.
But it's up to you to balance that impact with other potential issues:
- Making it "just right" can lead to memory grants that are too low if most/all values are more than half full.
- Making it 5X just in case seems like a lot, but think about how likely it is that the business requirement will evolve over time. Changing the column later could be more disruptive; consider not just the column itself but all the parameter and variable definitions, indexes, constraints, etc. that might also be affected, as well as application code that would have to change to accommodate a larger string.
What you should do depends on how confident you are that this will always be varchar(10)
. If you're not very confident, you might consider making it varchar(20)
or varchar(32)
but constraining it to the current requirement of 10 (with params to insert procedures and an actual constraint). If the requirement changes later, you only have to remove the constraint, change the parameter definitions, and then the apps can change at their own pace to start supporting the longer value.