OPTION(MAXDOP 1) in SQL Server

Question posted in Computer Software, Computer\IT Services on 10 2009
Rate question difficulty level 1 Votes
What can you do in order to improve SP execution time ?
You have improved you SP performance , add index to the right tables etc...
but you still getting time out , what will you next ?
 
 
1 Answer
 
One way I know is to use OPTION(MAXDOP 1).


It Sets the maximum number of processors the query processor can use to execute a single index statement. Fewer processors may be used depending on the current system workload.

check out See Rickie Lee's blog on parallelism and CXPACKET wait type.

code example :


SELECT *
FROM test t,
WHERE t.CourseID= 5
ORDER BY t.LessonWeekDay
option (MAXDOP 1)


10/27/2009
 
 
Add an answer*
 
Email
Now hiring!
Intuit 
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------