一。常见的分区类型
1.范围(range)分区
2.散列(hash)分区
3.组合(composite)分区
4.列表(list)分区
5.多列范围(multicolumn range)分区
6.索引分区
二。范围(range)分区
1.适用场景:连续的序列,比如流水号或是日期
2.建表脚本
create table dept
(deptno number(2),
dept_name varchar2(30))
partition by range(deptno)
(partition d1 values less than (10) tablespace TB_1,
partition d2 values less than (20) tablespace TB_2,
partition d3 values less than (maxvalue) tablespace TB_default);
三。散列(hash)分区
1.适用场景:不连续的序列,比如根据全局唯一的id或是随机字段
2.建表脚本
create table cust_sales_hash
(acct_no number(5),
cust_name varchar2(30),
sale_day integer not null,
sale_mth integer not null,
sale_yr integer not null
)
partition by