Friday, February 24, 2012

Intra-query parallelism

I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?Intra-query parallelism uses multiple threads to service a single query.
You can just add the OPTION (MAXDOP 1) to your SELECT/INSERT/UPDATE/DELETE
statement to suppress parallelism for that one query.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Ron Hinds" <billg@.microsoft.com> wrote in message
news:OViL%23ns2HHA.4184@.TK2MSFTNGP06.phx.gbl...
I'm saw this error for the first time this AM from a process which runs
nightly:
Server: Msg 8650, Level 13, State 1, Line 1 Intra-query parallelism caused
your server command (process ID #55) to deadlock. Rerun the query without
intra-query parallelism by using the query hint option (maxdop 1).
I read KB 837983 "You may receive error message 8650 when you run a query
that uses intra-query parallelism" and KB 315662 "FIX: Parallel query may
encounter undetected deadlock with itself" referenced by that article, as
well as the article mentioned by a MVP in this group in a message dated
07/26/2007. I also read up on Degrees of parallelism in BOL. What isn't
clear to me is, what exactly is meant by parallel "query" execution? Is this
referring to a single "query" being executed by multiple threads
simultaneously, or multiple threads executing separate "queries" (even
though the statements may be identical)? If it is the former then I see no
reason why I shouldn't go ahead and disable it, since only this one process
which runs after hours has generated the error. If it is the latter, then
that would seem to indicate that disabling parallel query execution
effectively would make my four CPU server a one CPU server. What I have read
seems to suggest the former, but nowhere is it stated outright. Can anyone
clear this up for me?

No comments:

Post a Comment