Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Tracey
Starting Member
40 Posts |
Posted - 2004-06-21 : 22:11:50
|
| Hi everyone,When i tried to Execute this Queryselect count(a.tfk)'Count', b.tpk, b.actfrom lra a, lraa bwhere a.tfk = b.tpkand a.tfk not in (select tpk from lraas)group by b.tpk, b.actServer: Msg 8650, Level 13, State 1, Line 1Intra-query parallelism caused your server command (process ID #100) to deadlock. Rerun the query without intra-query parallelism by using the query hint option (maxdop 1).I tried to use option (MAXDOP 1), but it still does the same.which is:Is there anyway to rewrite the query in better way?Many thanksTracey |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-06-21 : 22:45:46
|
| SELECT COUNT(a.tfklraassm) AS 'Count', b.tpklraacty, b.actycodeFROM lraasac a INNER JOIN lraacty b ON a.tfklraacty = b.tpklraacty LEFT OUTER JOIN lraassm c ON a.tfklraassm = c.tpklraassmWHERE c.tpklraassm IS NULLThis will work. And, don't use that syntax. :) It's not ANSI standard and should be avoided.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Tracey
Starting Member
40 Posts |
Posted - 2004-06-21 : 23:38:33
|
| Thanks Derrick,I will run this and let you know the result!many thanksTracey |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-06-22 : 05:37:19
|
| Do you have sp3a or sp3? This was a problem that was fixed in some cases.Looks like more were introduced as well.Look at this for a few workaroundshttp://support.microsoft.com/?kbid=837983Don't see how you can get this when you set maxdop=1 though.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Tracey
Starting Member
40 Posts |
Posted - 2004-06-22 : 21:31:22
|
| its SP3a.I have used the Query given by Derrick.It does the job!thanks GuysTracey |
 |
|
|
|
|
|
|
|