Parallel INDEX Operation are available only in SQL Server Enterprise Edition.
MAXDOP can also be used a QUERY HINT Option
In a multiprocessor SQL Server System, this setting controls the number of processors you want to use in query execution or use in parallel Query execution.
When we execute a SQL Query, the Query processor in the SQL Server Engine, goes to work and determines among other factors, the processors to use for the Query. If the setting is at default, SQL Server will determine the number of Processors to use for a particular Query, depending upon the complexity of the query.
Default setting is = 0 (use at will or all) – which tells SQL Server to use all the available processors as desired for the particular query.
This setting can be changed in many ways and some are:
using SSMS: Right click on Server –> Properties, then click on Advanced.
or using sp_configure in Query Analyzer.
sp_configure ‘show advanced options’,’1′
reconfigure with override
again specify sp_configure and t will produce these results. you can change the value if you are an expert, otherwise leave it at default as it best perform when at default.
Now using the MAXDOP in the SELECT Query as Query Hint is also possible as with this example from BOL:
USE AdventureWorks ;
GO
SELECT ProductID, OrderQty, SUM(LineTotal) AS Total
FROM Sales.SalesOrderDetail
WHERE UnitPrice < $5.00
GROUP BY ProductID, OrderQty
ORDER BY ProductID, OrderQty
OPTION (MAXDOP 2); – tells the query to use 2 processors.
SQL Server will self detect the best degree of parallelism based on :
- If sufficient result is the be produced, i.e. sufficient number of rows are present as a result.
- Type of Query or INDEX used. (Large Joins and Aggregates)
- If sufficient Threads are available for the operation. (More threads are required to execute a Query in parallel than when it is executed serially, if the thread requirement is not met, by sql server it decreases the parallel execution or completely abandons the parallel execution).
A bit complex internally to SQL Server, so lets us concentrate on our Queries for now and if we want to control the num of processors used for a Query.
I would suggest to give this a try if you have more then 4 processors. If you have a total of 4 Processor(Physical+Hyper threaded), leave this to default.
But i had benefitted on one of my Servers (running solarwinds network performance monitoring services) Running Extensive transactions. I Turned off the Max Degree of Parallelism and the server was faster with no locking scenarios than before the setting was at default of 0.
sp_configure ‘Max degree of parallelism’,’1’ – use this to turn off the parallelism.
Pl read more before taking any action on your production servers. The information mentioned above benefitted me, and does not mean it will be same for you. So try the things on your TEST Servers before ever Thinking of the production boxes.