ORACLE10g新特性 全域性HASH分割槽索引

2021-09-22 19:06:13 字數 984 閱讀 9035

這兩天看文件時發現,oracle10g中新增了全域性分割槽索引的型別——hash分割槽。

在10g以前,oracle的全域性索引分割槽方法只有一種,即範圍分割槽。

sql> create table t_part_index (id number, name varchar2(30), create_date date);

表已建立。

sql> insert into t_part_index select rownum, object_name, created from dba_objects;

已建立57477行。

sql> commit;

提交完成。

sql> create index ind_part_index_create

2  on t_part_index (create_date) global

3  partition by range (create_date)

4  (partition p1 values less than (to_date('2008-1-1', 'yyyy-mm-dd')),

5  partition p2 values less than (to_date('2009-1-1', 'yyyy-mm-dd')),

6  partition pmax values less than (maxvalue));

索引已建立。

而在10g中,oracle新增了一種全域性索引的分割槽方式,使用者可以選項hash分割槽方式對全域性索引進行分割槽:

sql> create index ind_part_index_id

2  on t_part_index (id) global

3  partition by hash (id)

4  partitions 16;

索引已建立。

這種全域性雜湊分割槽索引比較適合像id這種資料增長型索引,通過hash演算法,可以將遞增的索引鍵值分布到多個分割槽上,從而避免系統爭用。

Oracle 10g最佳20個新特性 3

圖 8 活動會話等待 該畫面顯示會話正在等待的等待事件是 enq tx row lock contention。那麼導致此問題的 sql 語句是什麼?很簡單 畫面本身顯示了語句 8rkquk6u9fmd0 的 sql id 在紅色圓圈中 單擊該 sql id,調出如圖 9 所示的 sql 畫面。圖 ...

Oracle 10g新特性 選擇性編譯

fuyuncat www.hellodba.com oracle10g中提供了乙個十分方便開發人員的新特性 選擇性編譯。即可以通過條件,只編譯pl sql中的部分 如果你對c 很熟悉,那你會對這個特 覺非常親切,因為它和c 中的條件巨集十分相似。在9i的時候,開發人員將自己的除錯資訊加入到程式中,往...

oracle 10g的閃回特性

1.先介紹兩個表 select from tab 檢視有那些表 select from ind 檢視有那些索引 2.試驗指令碼 create table abc id int create index abc on abc id commit insert into abc values 1 ins...