Can this run in parallel or can the spills be prevented? There are 64 cores on the server we can utilize if needed. Can the duration of this merge speed up ? The target table is partitioned (has indexed view on it which is forcing a wide update regardless etc) Thank you
By GokhanVarol 380 asked May 31, 2013 at 02:20 PM
I can't immediately see a reason that this query could not use parallelism, but you could try compiling it with TF 8649 to check that.
I don't see any spill warnings in the posted plan.
Yes. The Filters before the various Index Updates and Inserts are checking to see if the indexed values have changed; if not, the change is skipped.
Probably. I have generally found that
Side note: I very much prefer to express the test
By SQLkiwi ♦ 6.6k answered Jun 02, 2013 at 05:46 AM
I would wrap the operators in () to show proper grouping. It looks like you only care if the "ON" statement matches when it also matches "t.AbsenteeOwnrIrisCd IS NULL AND s.AbsenteeOwnrIrisCd IS NOT NULL" Else the "ON" doesn't have to match but the "t.AbsenteeOwnrIrisCd IS NOT NULL AND s.AbsenteeOwnrIrisCd IS NULL" must match.
If this is what you wanted then OK but if it isn't then see below.
I would change to
ISNULL(t.AbsenteeOwnrIrisCd,'') <> ISNULL(s.AbsenteeOwnrIrisCd,'')
ISNULL(t.CntyLegalTxt,'') <> ISNULL(s.CntyLegalTxt,'')
By kfraz 31 answered May 31, 2013 at 03:40 PM