|
renfengjun 发表于 2012-9-25 13:19 ![]()
我觉得删除hash partition 中的 分区,没有什么意义。首先数据是根据partition key 的hash 值分布数据的,难 ...
起初我也是这么认为,但转念却又起疑问,为何 ORACLE 又允许 TRUNCATE HASH PARTITION?
难道正巧要删除某个分区中的所有数据?
SCOTT@ncdb>create table t_partition_hash (id number,name varchar2(50))
2 partition by hash(id)
3 (partition t_hash_p1,
4 partition t_hash_p2,
5 partition t_hash_p3);
Table created.
Elapsed: 00:00:00.53
SCOTT@ncdb>alter table t_partition_hash truncate partition t_hash_p1;
Table truncated.
Elapsed: 00:00:00.11
SCOTT@ncdb>alter table t_partition_hash drop partition t_hash_p1;
alter table t_partition_hash drop partition t_hash_p1
*
ERROR at line 1:
ORA-14255: table is not partitioned by Range, List, Composite Range or Composite List method
Elapsed: 00:00:00.01
SCOTT@ncdb> |
|