1.方法一
select /*+ parallel(4) / count() from test_a
2.方法二
查看表的degree(并行度)
select OWNER,TABLE_NAME,TABLESPACE_NAME,DEGREE from dba_tables where TABLE_NAME=‘F’;
修改并行度
alter table def.f parallel(degree 3);
alter table t parallel; ----------设置表的并行度为default
3.方法三
索引并行
1.并发常见索引
CREATE INDEX 索引名 ON 表名(字段名) parallel 32;
2.关闭并发(不关闭的话会导致索引使用索引都变成并行查询)
ALTER INDEX 索引名 noparallel;
查询索引并行参数
select index_name,degree from dba_indexes where index_name=‘IND_KK’;