how to run a parallel query on sql server 2008?

2019-05-21 00:52发布

问题:

i want to run a query on multiple processors. what is the syntax to run a parallel query? please provide a sample query

回答1:

You don't: the optimizer decides based on the "cost" of the query (and some other factors)

See BOL: Parallel Query Processing

Now, you can limit parallelism with MAXDOP or change the cost threshold, but it's not something I'd do.

Why do you want to explicitly set this?