>  기사  >  데이터 베이스  >  Oracle使用并行建索引需要注意的问题

Oracle使用并行建索引需要注意的问题

WBOY
WBOY원래의
2016-06-07 16:49:241059검색

Oracle建索引时,我们为了建索引快,会加上并行,加上并行之后,此列索引就会是并行了。访问有并行度的索引时,CBO可能可能会考虑

Oracle建索引时,我们为了建索引快,会加上并行,加上并行之后,此列索引就会是并行了。访问有并行度的索引时,CBO可能可能会考虑并行执行,这可能会引发一些问题,如在服务器资源紧张的时候用并行会引起更加严重的争用。当使用并行后,需要把并行度改回来。
 
SQL> drop table test purge;
 SQL> create table test as select * from dba_objects;
 SQL> create index ind_t_object_id on test(object_id) parallel 4 ;
 SQL> select s.degree
      from dba_indexes s
      where s.index_name = upper('ind_t_object_id');
 DEGREE
 ----------------------------------------
 4
 
SQL> alter index ind_t_object_id noparallel;
 
SQL> select s.degree
      from dba_indexes s
      where s.index_name = upper('ind_t_object_id');
 DEGREE
 ----------------------------------------
 1

 Oracle 中并行度的设置需要考虑的因素

本文永久更新链接地址:

linux

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.