这两种方式建的范围分区表有什么区别呢
首先,我建了三个表空间:flp,p1,p2,对应到数据库文件,flp.dnf,p1.dnf,p2.dnf
然后我建了下面两个分区表
create table inter_table1
(id number, fid number, new_name varchar2(30), create_date date, comments varchar2(1000))
partition by range (create_date)
(partition p1 values less than (to_date('2005-1-1', 'yyyy-mm-dd')),
partition p2 values less than (maxvalue)
);
create table inter_table2
(id number, fid number, new_name varchar2(30), create_date date, comments varchar2(1000))
tablespace flp
partition by range (create_date)
(partition p3 values less than (to_date('2005-1-1', 'yyyy-mm-dd')),
partition p4 values less than (maxvalue)
);
inter_table1 好理解,将数据放到两个物理分区上
但inter_table2,怎么理解呢,数据都是放到flp.dnf中,那么这是否意味着没分区?这样的分区表与不分区是不是差不多?
分区表
------解决方案--------------------create table inter_table1
(id number, fid number, new_name varchar2(30), create_date date, comments varchar2(1000))
partition by range (create_date)
(partition p1 values less than (to_date('2005-1-1', 'yyyy-mm-dd')) <span style="color: #FF0000;">tablespace p1</span>,
partition p2 values less than (maxvalue) <span style="color: #FF0000;">tablespace p2</span>
);