Oracle查询创建多个会话

问题描述 投票:0回答:2

我正在运行一个选择声明,它获得200多个会话。我无法得到根本原因,为什么它提供了太多的连接。

样本声明:

 Select name from tablename where colname=xyz;

表是散列分区(10个分区),索引也是散列分区(10个分区)。

oracle oracle11g partition database-partitioning
2个回答
1
投票

它可能是由并行执行引起的。使用提示禁用:

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;

0
投票

我知道这不是你的问题,但是散列分区的数量应该是2的幂

© www.soinside.com 2019 - 2024. All rights reserved.