这个能执行么? alter table [jmmxa0609] alter column ID int 是不是option 只能加在查询语句后面?
alter table [jmmxa0609] alter column ID int option(maxDOP 4) 语法验证不通过 option(maxDOP 4)-->这个你想干 什么 --只能 alter table [jmmxa0609] alter column ID int null or alter table [jmmxa0609] alter column ID int not null
在sql server里不支持对某个列,定义它的最大并行度,看下面的试验:--并行度,只是实例级别的,不能具体到某个数据库,某个表,某个列 --下面的value为0表示,可以使用所有的处理器,也就是由系统来决定是否采用并行计划 select * from sys.configurations where name = 'max degree of parallelism' /* configuration_id name value minimum maximum value_in_use description is_dynamic is_advanced 1539 max degree of parallelism 0 0 1024 0 maximum degree of parallelism 1 1 */--但是你也可以在查询中指定option(maxdop 4) --当然,这个也是建议查询优化器生成并行计划, --如果查询优化器觉得多用几个cpu能让查询更快,那么就会生成并行计划 select * from sys.objects option(maxdop 32)
alter table [jmmxa0609] alter column ID int
是不是option 只能加在查询语句后面?
语法验证不通过
option(maxDOP 4)-->这个你想干 什么
--只能
alter table [jmmxa0609] alter column ID int null
or
alter table [jmmxa0609] alter column ID int not null
不是不alter table 不支持 带 option (maxDOP 4)我的出发点是想借多几个CPU 来跑 这相事情, 因为 有4个 E7- 4830 = 64 逻辑CPU.
官方文档 http://technet.microsoft.com/zh-cn/library/ms190273(v=sql.105).aspx
在sql server里不支持对某个列,定义它的最大并行度,看下面的试验:--并行度,只是实例级别的,不能具体到某个数据库,某个表,某个列
--下面的value为0表示,可以使用所有的处理器,也就是由系统来决定是否采用并行计划
select *
from sys.configurations
where name = 'max degree of parallelism'
/*
configuration_id name value minimum maximum value_in_use description is_dynamic is_advanced
1539 max degree of parallelism 0 0 1024 0 maximum degree of parallelism 1 1
*/--但是你也可以在查询中指定option(maxdop 4)
--当然,这个也是建议查询优化器生成并行计划,
--如果查询优化器觉得多用几个cpu能让查询更快,那么就会生成并行计划
select *
from sys.objects
option(maxdop 32)