--查看索引
select *? from DBA_IND_PARTITIONS t;
select status,t.* from dba_indexes t where t.OWNER='GANSUSC';
select count(*) from ACT_HI_VARINST
SELECT 'ALTER INDEX ' || TABLE_OWNER || '.' || INDEX_NAME || ' UNUSABLE;' UNUSABLE_INDEX
FROM ALL_INDEXES
alter index ACT_IDX_HI_PRO_INST_END rebuild tablespace TBS_XQGL;
--建設和其他表一樣的表
create table act_hi_varinst170103 as select * from act_hi_varinst;
--清理表
truncate table act_hi_varinst;
select * from act_hi_varinst\
--往表灌數據
insert into act_hi_varinst select * from act_hi_varinst170103;
select * from act
select table_name, partition_name
? from user_tab_partitions
?where table_name = 'ACT_HI_VARINST';
--刪除表
drop table act_hi_varinst ;
--表分區建表
create table ACT_HI_VARINST (
? id_??????????????? NVARCHAR2(64) not null,
? proc_inst_id_????? NVARCHAR2(64),
? execution_id_????? NVARCHAR2(64),
? task_id_?????????? NVARCHAR2(64),
? name_????????????? NVARCHAR2(255) not null,
? var_type_????????? NVARCHAR2(100),
? rev_?????????????? INTEGER,
? bytearray_id_????? NVARCHAR2(64),
? double_??????????? NUMBER(*,10),
? long_????????????? NUMBER(19),
? text_????????????? NVARCHAR2(2000),
? text2_???????????? NVARCHAR2(2000),
? create_time_?????? TIMESTAMP(6),
? last_updated_time_ TIMESTAMP(6)
) partition by range(create_time_)
?interval (numtodsinterval(1,'day'))
?(
? partition create_time_ values less than (to_date('2016-01-01','yyyy-mm-dd'))
?);
?
?
?--查看表分區
?select table_name,partition_name from user_tab_partitions where table_name='ACT_HI_VARINST';