表和索引並行查詢

csbin發表於2012-03-30

----------------------------------------------------------------------------
-- 1、設定表並行查詢
----------------------------------------------------------------------------
alter table tfa_alarm_clr_test parallel 1;
alter table tfa_alarm_clr_test parallel 8;

alter table tfa_alarm_clr_test noparallel;

select /*+parallel(a,8)*/ count(1) from tfa_alarm_clr_test a;


-- 表並行度degree
select t.table_name, t.degree
  from user_tables t
where t.table_name = 'TFA_ALARM_CLR_TEST';

----------------------------------------------------------------------------

-- 2、設定表並行索引查詢
----------------------------------------------------------------------------
alter index tfa_alarm_clr_test_1 parallel 1;
alter index tfa_alarm_clr_test_1 parallel 8;

alter index tfa_alarm_clr_test_1 noparallel;


select /*+parallel_index(a,8)*/count(1) from tfa_alarm_clr_test a;


select t.index_name, t.degree

from user_indexes t
where t.index_name = 'TFA_ALARM_CLR_TEST_1';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/720091/viewspace-1057773/,如需轉載,請註明出處,否則將追究法律責任。

相關文章