????Oracle?????????????Oracle????????????????????????κ????????????????????????????????????????о????????????????????????????????????????????????????????GPS???????????????????????????GB??????????????????????????????????Ч????????????????????????ü?????
???????????????????
????1)?????????????????????????????????????????????????????????
????2)????????????????????????????????????????????÷????????
????3)????I/O??????????????????????????I/O?????????????????
????4)???????????????????????????????????????????????????????
????Oracle???????????????????????????????
????ü??Χ????
????üHash????????з?????
????ü???????
?????????Χ??????????
??????Χ?????????????е????????Χ???з????????????????Χ??????????????洢??????????????????????????????????????з?????????????????С??2000000?????part01?? 2000000~4000000?????part02??????
????create table AAA
????(
????id number primary key??
????indate date not null
????)
????partition by range(indate)
????(
????partition part_01 values less than(to_date(‘2006-01-01’??’yyyy-mm-dd’))tablespace space01??
????partition part_02 values less than(to_date(‘2010-01-01’??’yyyy-mm-dd’))tablespace space02??
????partition part_03 values less than(maxvalue)tablespace space03
????);
????space01 space02 space03?????????????????????????????????????3???????????????????
????????Hash????????з???????????
??????з?????????????????????????????????????????????????I/O?豸???????з??????????Щ??????С????????????????????????????????????????
?????????????????????
?????????????????????Χ????????????????????????е?????????????У??????????????????????????????????÷?Χ???????????????????????????з?????????????????
????partition by range(indate)subpartition by hash(id)
????subpartitions 3 store in (space01?? space02?? space03)
????(
????partition part_01 values less than(to_date(’2006-01-01’??’yyyy-mm-dd’))??
????partition part_02 values less than(to_date(’2010-01-01’??’yyyy-mm-dd’))??
????partition part_03 values less than(maxvalue)
????);
????????????????
????1??????????insert into AAA values(1 ??sysdate);
????2???????????????select * from AAA partition(part_01);
????3?????·??????????update AAA partition(part_01) t set indate=’’where id=1; ????????μ??????????????????????????????÷?????????????????????
????4???????????????delete from AAA partition(part_02) t where id=4; ????????????????????е??????????÷??????????????????κ??????
????5???????????????alter table AAA add partition part_04 values less than(to_date(’2012-01-01’??’yyyy-mm-dd’)) tablespace dinya_spa ce03; ????????????????????????????????????????з????????????????????ORA-14074 partition bound must collate higher than that of the last partition ????
????6??????????????alter table AAA merge partitions part_01??part_02 into partition part_02; ??????????????????????????part_01????????????ORA-14275 cannot reuse lower-bound partition as resulting partition ????
????7???????????alter table AAA drop partition part_01; ?????????????????????????????????????÷????е?????????????????????????????????????????????????????????У????????????
?????塢????????
????????????????????????????????????????????????????????????????????г???????????????????з????е?????????????????????????
????1. ??????????????????create index idx_t on AAA(id)
????local
????(
????partition idx_1 tablespace space01??
????partition idx_2 tablespace space02??
????partition idx_3 tablespace space03
????);
????2. ????????????global ?????????????????Χ????????Χ????????ε??Χ???create index idx_t on AAA(id)
????global partition by range(id)
????(
????partition idx_1 values less than (1000) tablespace space01??
????partition idx_2 values less than (10000) tablespace space02??
????partition idx_3 values less than (maxvalue) tablespace space03
????);
???????????????????????????????????????????:
????create index idx_t on AAA(id);