我正在运行一个选择声明,它获得200多个会话。我无法得到根本原因,为什么它提供了太多的连接。
样本声明:
Select name from tablename where colname=xyz;
表是散列分区(10个分区),索引也是散列分区(10个分区)。
它可能是由并行执行引起的。使用提示禁用:
Select /*+ no_parallel(t)*/ name from tablename t where colname=xyz;
-- disabling on session level
ALTER SESSION DISABLE PARALLEL QUERY;
你应该检查表/索引级别的DOP(并行度):
select owner,table_name, degree
from user_tables
where table_name in ('tablename');
alter table tablename noparallel;
我知道这不是你的问题,但是散列分区的数量应该是2的幂