I have the query below which is using a parallel query plan, I am not quite sure why its doing so, I think its to do with the design of the query but apart from adding indexes and specifying maxdop 1, I was wondering if there is anything else I can do in
order to rewrite the query to be more efficient and stop the use of the parallel plan.
Thanks in advance.
MERGE tblPersonProfile merge_target
USING #newrecs sourc ON merge_target.PersonURN = sourc.PersonURN AND [AddressURN]=AddressURN AND MatchCode =[ProfileMatchCode]
WHEN NOT MATCHED BY TARGET AND sourc.PersonURN IN ( SELECT PersonURN FROM #profiles ) THEN
INSERT (PersonURN, AddressURN, ProfileMatchCode)VALUES (sourc.PersonURN, sourc.AddressURN, sourc.MatchCode)
WHEN NOT MATCHED BY SOURCE AN
View Complete Post