SQL server

SQL query option MAXDOP.

There are options that can be specified on a per query level.  One example is the maxdop option which is used to specify the maximum degree of parallelism. There actual number of CPUs that will be used are based on the version of SQL, and the number of CPUs/processors available on the system. An example query is:

select * from table_name option (maxdop 1)

Replace table_name with a valid name. I ran this query on my server that had four processors dedicated to SQL. The query took around 2453 ms in the first run. After setting the option to 1 processor for the query, the query took 2781 ms. These times are not very indicative of the processing, as other factors are involved like query caching (if at all).


Thinking about someting? Leave a Reply...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s