I have a table like this:
Name | TimeA | TimeB | ValueA | ValueB
And I do a few MERGE operations as follows:
CREATE TABLE
The query execution plan indicates the following:
MERGE -> Table Merge 3% -> Compute Scalar 0% -> Top 0% -> Compute Scalar 0% -> Compute Scalar 0% -> Nested Loops (Left Outer Join) 0% <- Constant Scan 0% ^ | |
The plan, however, does not tell me that the index will improve performance. I think that a non-clustered index on (Name,TimeA) should improve performance. Is there a better way to achieve performance for MERGE queries like this?
EDIT 1 . I have to note the size of the tables. On average, Source always contains 30-70 lines on average, and Target contains> 30 million lines.
source share