I have two UPDATE queries, when executed together in SQL Command, takes about 5 minuts. but when executing together in management studio,totally takes about only 1 minute.
I have indexes on all the fields used in join. Have done some research and tries some suggested ways such as use various SET options. not quite useful.
FITokenCount = b.TokenCount
, FISignificantOPTotal = b.SignificantOPTotal
, FIInsignificantOPTotal = b.InsignificantOPTotal
n.InstitutionNumber = b.InstitutionNumber
n.DataItemUniqueID = b.DataItemUniqueID
WLTokenCount = wn.TokenCount
, WLSignificantOPTotal = wn.SignificantOPTotal
, WLInsignificantOPTotal = wn.InsignificantOPTotal
n.WatchListEntryNameID = wn.WatchListEntryNameID
--and wn.Type = 1;
Any inputs will be greatly appreiated.
View Complete Post