# Parallel Query Processing

- Link: https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/
- Published: 2015-05-26T07:25:32+05:30
- Author: Deviprasad Panda

* SQL Server provides parallel [queries processing](https://learn.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver16)
   to optimize query execution and index operations for computers that have more
   than one microprocessor (CPU). Because [SQL Server](https://atomic-temporary-119393429.wpcomstaging.com/improving-sharepoint-performance-using-sql-server-settings/)
   can perform a query or index operation in parallel by using several operating
   system threads, the operation can be completed quickly and efficiently.
 * During query optimization, SQL Server looks for queries or index operations that
   might benefit from parallel execution.
 * For these queries, SQL Server inserts exchange operators into the query execution
   plan to prepare the query for parallel execution.
 * After exchange operators are inserted, the result is a parallel-query execution
   plan.
 * A parallel query processing execution plan can use more than one thread. A serial
   execution plan, used by a nonparallel query, uses only one thread for its execution.
   The actual number of threads used by a parallel query is determined at query 
   plan execution initialization and is determined by the complexity of the plan
   and the degree of parallelism.
 * Degree of parallelism determines the maximum number of CPUs that are being used;
   it does not mean the number of threads that are being used. The degree of parallelism
   value is set at the server level and can be modified by using the sp_configure
   system stored procedure.
 * You can override this value for individual query or index statements by specifying
   the MAXDOP query hint or MAXDOP index option.

 Advertisements

The SQL Server query optimizer does not use a parallel execution plan for a query
if any one of the following conditions is true:

 * The serial execution cost of the query is not high enough to consider an alternative,
   parallel execution plan.
 * A serial execution plan is considered faster than any possible parallel execution
   plan for the particular query.
 * A serial execution plan is considered faster than any possible parallel execution
   plan for the particular query.

 Advertisements

## Configure the max degree of parallelism option

 * In Object Explorer, right-click a server and select Properties.
 * Click the Advanced node.
 * In the Max Degree of Parallelism box, select the maximum number of processors
   to use in parallel plan execution.

 Advertisements

### Share this:

 * [  X ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=twitter)
 * [  Facebook ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=facebook)
 * [  WhatsApp ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=jetpack-whatsapp)
 * [  Email ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?subject=%5BShared%20Post%5D%20Parallel%20Query%20Processing&body=https%3A%2F%2Fsharepointtechnicalsupport.com%2F2015%2F05%2F26%2Fparallel-query-processing%2F&share=email)
 * [  Telegram ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=telegram)
 * [  LinkedIn ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=linkedin)
 * [  Tumblr ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=tumblr)
 * [  Pinterest ](https://sharepointtechnicalsupport.com/2015/05/26/parallel-query-processing/?share=pinterest)

### Like this:

Like Loading…

### _Related_
