activiti删除历史数据

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');


 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值