I have a table with the following columns
Id - Int Primary key Identity column
Name - Varchar(100)
OrderValue - int
OrderDate - date
OrderState - varchar(100)
The columns (Name, orderValue) have a unique key constraint and a unique non-clustered index on them.
We have a new requirement where the OrderValue column will start receiving strings, floats, guids. The two options we have right now are to change the datatype of orderValue to either Varchar(100) or to SQL_Variant. My teammates are in favor of sql_variant. Their reasoning is that since orderValue is part of the Unique Non-clustered index, changing it sql_variant will make sorting easy on the index keys within the index table since all the datatypes of the same type are stored together. I'm not well versed with Sql_variant and how the indexes are stored for sql_variants but I've read that sql_variant's performance is usually bad. In our case, what would be a good option? How do non-clustered indexes work when they have one of the columns as sql_variant?