We have a table. We use a cluster index on these 2 columns
As you can see the first columns has mostly the same data and the second column has mostly different data.
The problem here is that to have a unique row selection you need both columns C1 and C2.
So we are creating a cluster index using both columns(cluster index C1 - C2 , with that order).
Is this OK?
Is there any difference (as the data grows) to do this:
Update table1 set x = 2, y=3 where C1=A and C2= 2 and Mydate between @dateFrom and @dateTo
rather than this:
Update table1 set x = 2, y=3 where C1=A and C2= 2
Would we have any performance upgrade on large data if we restrict the data to date periods rather than just using the cluster index?