最初由 xzh2000 发布
[B]”Parallel operations downgraded to serial +1“ 是什么意思? [/B]
是说 oracle没有进行操作 :)
又测试了一下其他的语法,结果是用了并行创建索引
QL> create table tt partition by range(owner) (partition pp values less than('ZZZ')) tablespace trade_data as select * from dba_objects;
Table created.
SQL> insert into tt select * from tt;
18919 rows created.
SQL> commit;
Commit complete.
SQL> insert into tt select * from tt;
37838 rows created.
SQL> commit;
Commit complete.
SQL> insert into tt select * from tt;
75676 rows created.
SQL> commit;
Commit complete.
SQL> create index ttidx on tt(owner,object_id) local (partition pmax) unusable;
Index created.
然后rebuild unusable索引,这样可以制定并行度 degree
SQL> alter index ttidx rebuild partition pmax parallel(degree 8);
Index altered.
SQL> select * from v$pq_tqstat;
DFO_NUMBER TQ_ID SERVER_TYP NUM_ROWS BYTES OPEN_TIME AVG_LATENCY WAITS TIMEOUTS PROCESS INSTANCE
---------- ---------- ---------- ---------- ---------- ---------- ----------- ---------- ---------- ---------- ----------
1 0 Consumer 25178 559424 0 0 91657 91653 P006 1
1 1 Producer 1 250 0 0 0 0 P006 1
1 0 Producer 20815 515510 0 0 19 0 P010 1
1 0 Consumer 44616 1055040 0 0 91656 91652 P007 1
1 1 Producer 1 250 0 0 0 0 P007 1
1 0 Producer 18266 454642 0 0 17 0 P012 1
1 0 Producer 16367 401364 0 0 16 0 P013 1
1 0 Producer 19454 484358 0 0 16 0 P008 1
1 0 Producer 18754 459723 0 0 17 0 P015 1
1 0 Producer 19846 508469 0 0 18 0 P011 1
1 0 Consumer 52249 1382005 0 0 6058 6053 P001 1
1 1 Producer 1 250 0 0 0 0 P001 1
1 0 Consumer 392 10412 0 0 91658 91653 P004 1
1 1 Producer 1 250 0 0 0 0 P004 1
1 0 Producer 18765 442271 0 0 17 0 P009 1
1 0 Consumer 5332 134830 0 0 6059 6053 P002 1
1 1 Producer 1 250 0 0 0 0 P002 1
1 0 Producer 19480 479316 0 0 19 0 P014 1
1 0 Consumer 18129 452006 0 0 91656 91652 P005 1
1 1 Producer 1 250 0 0 0 0 P005 1
1 0 Consumer 1299 34218 0 0 6058 6053 P003 1
1 1 Producer 1 250 0 0 0 0 P003 1
1 0 Consumer 4157 106181 0 0 6057 6053 P000 1
1 1 Producer 1 250 0 0 0 0 P000 1
1 1 Consumer 8 2000 0 0 2 0 QC 1
1 0 Ranger 56 11537 0 0 3 0 QC 1
26 rows selected.
oracle镇强
SQL> drop index ttidx;
Index dropped.
SQL> create index ttidx on tt(object_id) local parallel 8;
Index created.
SQL> select * from v$pq_tqstat;
no rows selected
SQL>