Tags: col1, database, deletes, hint, inserts, maxdop, microsoft, mysql, oracle, parallelism, select, server, sql, statements, thru, triggered, update, updates

Maxdop hint

On Database » Microsoft SQL Server

2,521 words with 2 Comments; publish: Mon, 02 Jun 2008 01:02:00 GMT; (250109.38, « »)

Is parallelism only triggered for select statements or do

inserts/updates/deletes also go thru parallelism such as

update a

set col1 = 1

from a join b

on a.col2=b.col3 ............

or

delete from a join b on a.col1=b.col2 ........

If so, and if we want to disable parallelism, how can we do so for

deletes/updates.. I guess Im asking if i just place the option (maxdop 1)

hint at the end of the statement ?

All Comments

Leave a comment...

  • 2 Comments
    • From Books Online , "Degree of Parallelism" topic

      "The INSERT, UPDATE, and DELETE operators are executed serially; however,

      the WHERE clause of either an UPDATE or DELETE, or SELECT portion of an

      INSERT statement may be executed in parallel. The actual data changes are

      then serially applied to the database."

      You can disable parallelism for INSERT, UPDATE and DELETE where relevant, in

      the same way as for SELECT, with OPTION (MAXDOP 1).

      --

      Jacco Schalkwijk

      SQL Server MVP

      "Hassan" <fatima_ja.sqlserver.todaysummary.com.hotmail.com> wrote in message

      news:%23U6JVjvSFHA.2128.sqlserver.todaysummary.com.TK2MSFTNGP15.phx.gbl...

      > Is parallelism only triggered for select statements or do

      > inserts/updates/deletes also go thru parallelism such as

      > update a

      > set col1 = 1

      > from a join b

      > on a.col2=b.col3 ............

      > or

      > delete from a join b on a.col1=b.col2 ........

      > If so, and if we want to disable parallelism, how can we do so for

      > deletes/updates.. I guess Im asking if i just place the option (maxdop 1)

      > hint at the end of the statement ?

      >

      >

      >

      #1; Mon, 02 Jun 2008 01:03:00 GMT
    • Parallelism can also be set globally for the server in SEM>

      --

      Wayne Snyder MCDBA, SQL Server MVP

      Mariner, Charlotte, NC

      (Please respond only to the newsgroup.)

      I support the Professional Association for SQL Server ( PASS) and it's

      community of SQL Professionals.

      "Hassan" <fatima_ja.sqlserver.todaysummary.com.hotmail.com> wrote in message

      news:%23U6JVjvSFHA.2128.sqlserver.todaysummary.com.TK2MSFTNGP15.phx.gbl...

      > Is parallelism only triggered for select statements or do

      > inserts/updates/deletes also go thru parallelism such as

      > update a

      > set col1 = 1

      > from a join b

      > on a.col2=b.col3 ............

      > or

      > delete from a join b on a.col1=b.col2 ........

      > If so, and if we want to disable parallelism, how can we do so for

      > deletes/updates.. I guess Im asking if i just place the option (maxdop 1)

      > hint at the end of the statement ?

      >

      >

      >

      #2; Mon, 02 Jun 2008 01:04:00 GMT