如何在sql server 2008上运行并行查询?

时间:2023-01-19 08:34:56

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

我想在多个处理器上运行一个查询。运行并行查询的语法是什么?请提供一个查询示例

1 个解决方案

#1


4  

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

不需要:优化器根据查询的“成本”(以及其他一些因素)来决定

See BOL: Parallel Query Processing

参见BOL:并行查询处理

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

现在,你可以用MAXDOP限制并行度或者改变成本门槛,但这不是我要做的。

Why do you want to explicitly set this?

为什么要显式设置这个?

#1


4  

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

不需要:优化器根据查询的“成本”(以及其他一些因素)来决定

See BOL: Parallel Query Processing

参见BOL:并行查询处理

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

现在,你可以用MAXDOP限制并行度或者改变成本门槛,但这不是我要做的。

Why do you want to explicitly set this?

为什么要显式设置这个?