在建表和索引的过程中,可以指定parallel参数来加快速度,但是很多人使用之后忘记将他们改回去,导致sql的效率低下,为了找出库中这些表和索引,我们可以使用以下语句
select degree,count(*) from dba_indexes group by degree;
1|16088
DEFAULT|18
8|390
0|551
有四种,
1表示noparallel
default表示parallelism=cpu_count*parallel_threads_per_cpu
其中rac下的cpu_count=所有节点的总共cpu个数
8表示parallel(degree 8)
0的对象都是SYS_IL0000316374C00015$$此类名字的索引
所以8和default的索引都需要改
The Degree of Parallelism
The number of parallel slave processes associated with an operation is called its degree of parallelism . Don't confuse this term with the DEGREE keyword. They aren't exactly the same thing. In Oracle, the degree of parallelism consists of two components, the number of instances to use and the number of slave processes to use on each instance. In Oracles SQL syntax, the keywords INSTANCES and DEGREE are always used to specify values for these two components as follows:
INSTANCES: Specifies the number of instances to use
DEGREE: Specifies the number of slave processes to use on each instance
INSTANCES applies only to the Oracle Parallel Server configuration. Unless you are using OPS, the value of INSTANCES should be set to 1; any other value is meaningless.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16158219/viewspace-594946/ ,如需转载,请注明出处,否则将追究法律责任。