I have a table with around 100 columns and need to only add a new row if a combination of columns is unique. The problem is that there are around 50 columns that I need to check so a simple where clause could be very slow on a large amount of data.
Would it be advised to create a unique hash of all the values of those fields in C# beforehand and storing that in a new column in the table and compare based on that?