<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 60,comments - 71,trackbacks - 0
    本文來自:http://m.tkk7.com/improviser/archive/2007/10/01/150073.html

        Oracle中提供了對表進行分區(qū)的機制,通過表分區(qū),可以將表空間中數(shù)據(jù)按照某種方式分別存放到特定的分區(qū)中。表分區(qū)的作用:平衡IO操作,分區(qū)均勻,提高效率。

       Oracle中表分區(qū)方法有:范圍分區(qū)法、散列分區(qū)法、復合分區(qū)法、列表分區(qū)法。

     范圍分區(qū):
    語法
    Partition  by  range(); 適合數(shù)值型或日期型
     
    示例:
     1 create table Student
     2(
     3     Studentid integer not null,
     4     Studentname varchar2(20),
     5     Score integer
     6)
     7 Partition by range(Score)
     8(
     9     Partition p1 values less than(60),
    10     Partition p2 values less than(75),
    11     Partition p3 values less than(85),
    12     Partition p4 values less than(maxvalue)
    13 );

      散列分區(qū)法:根據(jù)Oracle內(nèi)部散列算法存儲,語法 Partition by hash();
     
    實例:
     1 create table department
     2 (
     3     Deptno int,
     4     Deptname varchar2(24)
     5 )
     6 Partition by hash(deptno)
     7 (
     8     Partition p1,
     9     Partition p2
    10 );

      復合分區(qū)法:由上面兩種方法復合而成
      示例:

     1 create table salgrade
     2 (
     3     grade number,
     4     losal number,
     5     hisal number
     6 )
     7 Partition by range(grade)
     8 Subpartition by hash(losal,hisal)
     9 (
    10     Partition p1 values less than(10),
    11       (subpartition sp1,subpartition sp2),
    12     Partition p2 values less than(20),
    13       (subpartition sp3,subpartition sp4)
    14 )

      列表分區(qū)法:適合字符型 語法Partition by list()
      實例:

     1 create table customer
     2 (
     3     custNo int,
     4     custname varchar(20),
     5     custState varchar(20)
     6 )
     7 Partition by list(custState)
     8 (
     9     Partition saia values('中國','韓國','日本'),
    10     Partition Europe values('英國','俄國','法國'),
    11     Partition ameria values('美國','加拿大','墨西哥'),
    12 );
    13     

    表分區(qū)維護:

    添加分區(qū):alter table student add partition p5 values less than(120);
    刪除分區(qū):alter table student drop partition p4;
    截斷分區(qū):alter table student truncate partition p5;
    合并分區(qū):alter table student merge partitions p3,p4 into partition p6;
    posted on 2008-06-18 17:28 henry1451 閱讀(374) 評論(0)  編輯  收藏 所屬分類: Oracle技術(shù)
    主站蜘蛛池模板: 亚洲国产美国国产综合一区二区| 青草草色A免费观看在线| 亚洲成人午夜电影| 爱爱帝国亚洲一区二区三区| 羞羞视频在线观看免费| 啦啦啦完整版免费视频在线观看| 毛片a级毛片免费播放100| 精品亚洲视频在线观看| 亚洲一区二区三区久久| 偷自拍亚洲视频在线观看| 1000部羞羞禁止免费观看视频 | 国产亚洲av片在线观看18女人 | 亚洲AV无码无限在线观看不卡 | 国产高清对白在线观看免费91| 国产亚洲精品bv在线观看| 亚洲精品线在线观看| 亚洲色精品88色婷婷七月丁香| 免费国产美女爽到喷出水来视频| 久久精品无码一区二区三区免费| 日本xxxx色视频在线观看免费| 两个人看的www高清免费视频| 一级毛片免费毛片毛片| 农村寡妇一级毛片免费看视频| 337p日本欧洲亚洲大胆人人| 亚洲AV日韩综合一区尤物| 亚洲不卡影院午夜在线观看| 亚洲一级毛片免费观看| 亚洲一区二区三区播放在线| 亚洲成a人片7777| 亚洲成a人片在线观| 亚洲一区二区三区精品视频| 亚洲Av无码一区二区二三区| 亚洲偷自精品三十六区| 国产精品亚洲综合久久| 亚洲免费一级视频| 欧洲 亚洲 国产图片综合| 自拍偷区亚洲国内自拍| 色综合久久精品亚洲国产| 国产亚洲蜜芽精品久久| 一级午夜免费视频| 中国国语毛片免费观看视频|