marrowyung
asked on
CPU intensive query#2
Dear all,
I found out some SQL queries that make the CPU hight, tempdb usage hight and I dont' know how to solve, please comment.
now the in the execution plan, what I can see the high cost is 2 x table scan, so how to solve it?
execution plan:
I found out some SQL queries that make the CPU hight, tempdb usage hight and I dont' know how to solve, please comment.
FROM #VendorDD dd
JOIN @CountryCode cc ON dd.CountryCode = cc.CountryCode
LEFT JOIN #DDRoot r1 ON dd.DialedDigits = r1.DD
LEFT JOIN #DDRoot r2 ON dd.DestinationID = r2.AttributesID -- 2004.10.25 sg #7148-#7149
WHERE r1.DD IS NULL
AND r2.AttributesID IS NULL
AND @EffDate BETWEEN dd.BeginDate AND ISNULL(dd.EndDate, @EffDate)
.....
.
now the in the execution plan, what I can see the high cost is 2 x table scan, so how to solve it?
execution plan:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
as you proactive help me, then that;s why you get my award! I appreciate your help and I usually just want the helper and reader direct me to the right point of solving problem why is it.
and I will keep learning from you all.
and I will keep learning from you all.
ASKER
ok, tks.
ASKER