SELECT * FROM ACT_HI_DETAIL WHERE 1=1;
select * from ACT_HI_ATTACHMENT;
SELECT * FROM ACT_HI_COMMENT WHERE 1=1;
SELECT * FROM ACT_HI_IDENTITYLINK WHERE 1=1;
SELECT * FROM ACT_HI_PROCINST WHERE 1=1;
SELECT * FROM ACT_HI_VARINST WHERE 1=1;
SELECT * FROM ACT_HI_TASKINST WHERE 1=1;
SELECT * FROM ACT_HI_ACTINST WHERE 1=1;
SELECT * FROM ACT_RU_IDENTITYLINK WHERE 1=1;
SELECT * FROM ACT_RU_TASK WHERE 1=1;
SELECT * FROM ACT_RU_VARIABLE ;
SELECT * FROM ACT_RU_EXECUTION WHERE 1=1;
SELECT * FROM ACT_RE_PROCDEF WHERE 1=1;
SELECT * FROM ACT_GE_BYTEARRAY WHERE 1=1;
SELECT * FROM ACT_RE_DEPLOYMENT WHERE 1=1;
SELECT * FROM ACT_GE_BYTEARRAY a WHERE 1=1 and a.ID_ in (SELECT a.BYTEARRAY_ID_ FROM ACT_HI_VARINST a WHERE 1=1 and a.BYTEARRAY_ID_ is not null and a.CREATE_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss'));
SELECT a.* FROM ACT_HI_VARINST a WHERE 1=1 and a.BYTEARRAY_ID_ is not null and a.CREATE_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
SELECT a.* FROM ACT_HI_PROCINST a WHERE 1=1 and a.END_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
SELECT a.* FROM ACT_HI_TASKINST a WHERE 1=1 and a.START_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
SELECT a.* FROM ACT_HI_ACTINST a WHERE 1=1 and a.START_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
-- 删除历史变量 二进制数据
DELETE FROM ACT_GE_BYTEARRAY a WHERE 1=1 and a.ID_ in (SELECT a.BYTEARRAY_ID_ FROM ACT_HI_VARINST a WHERE 1=1 and a.BYTEARRAY_ID_ is not null and a.CREATE_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss'));
-- 删除历史变量
DELETE FROM ACT_HI_VARINST a WHERE 1=1 and a.BYTEARRAY_ID_ is not null and a.CREATE_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
-- 删除历史流程实例
DELETE FROM ACT_HI_PROCINST a WHERE 1=1 and a.END_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
-- 删除历史任务实例
DELETE FROM ACT_HI_TASKINST a WHERE 1=1 and a.START_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');
-- 删除历史节点表
DELETE FROM ACT_HI_ACTINST a WHERE 1=1 and a.START_TIME_ < TO_DATE('2019-06-01 00:00:00','yyyy-mm-dd hh24:mi:ss');