【发布时间】:2019-03-03 12:32:48
【问题描述】:
我正在运行一个 select 语句,它获得了 200 多个会话。我无法找到导致连接过多的根本原因。
示例语句:
Select name from tablename where colname=xyz;
表是散列分区(10 个分区),索引也是散列分区(10 个分区)。
【问题讨论】:
标签: oracle oracle11g partition database-partitioning
我正在运行一个 select 语句,它获得了 200 多个会话。我无法找到导致连接过多的根本原因。
示例语句:
Select name from tablename where colname=xyz;
表是散列分区(10 个分区),索引也是散列分区(10 个分区)。
【问题讨论】:
标签: oracle oracle11g partition database-partitioning
这可能是由并行执行引起的。通过提示禁用:
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 的幂
【讨论】: