以下のコードがあります..更新列にインデックスを作成すると、クエリは高速になりますか?
CREATE NONCLUSTERED INDEX tmp ON #TestTable (
jobid,
RecordGroup,
RecordSubGroup,
OpenDate
)
UPDATE #TestTable
SET OpenDate = OB.col1
, OpenWrap = OB.col2
, OpenBalance = OB.col3
FROM #TestTable ST
JOIN JobRecordOut OB ON OB.JobId = ST.JobId
AND OB.RecordGroup = ST.RecordGroup
AND OB.RecordSubGroup = ST.RecordSubGroup
AND OB.RecordType = 'OB'
DROP INDEX tmp ON #TestTable