oracle自动分区 (时间 数字) 博客分类: Oracle小记 oracle自动分区时间数字
程序员文章站
2024-02-13 16:31:46
...
按照时间,每天分区
create table test_p(id number,createtime date)
partition by range(createtime) interval(numtodsinterval(1,'day')) store in (users)
(
partition test_p_p1 values less than(to_date('20140110','yyyymmdd'))
);
create index index_test_p_id on test_p(id) local;
create index index_test_p_createtime test_p(createtime) local;
按照数字,200000一个分区
create table test_p(id number,createtime date)
partition by range(id) interval(200000) store in (users)
(
partition test_p_p1 values less than(200000)
);
create index index_test_p_id on test_p(id) local;
create index index_test_p_createtime test_p(createtime) local;