jbpm4_lob这个表巨大
lydawen
2012-03-09
今天整理数据库发现 jbpm4_lob这个表真是巨大无比啊,请教安全清理方法,谢谢。
|
|
lydawen
2012-03-15
因为使用的是jbpm4.3,鉴于它的一个bug导致子流程结束了,对应的流程实例未删除,所以当我们系统实例(含子)在几百万时,jbpm4_lob这个表就巨大的恐怖。网上大部分介绍jbpm4_lob只说它是存储流程定义,流程定义再多也不可能达到我们的 4000多万条记录。
所以有以下语句: select count(*) from jbpm4_lob; select count(*) from jbpm4_lob jl where exists(select 1 from jbpm4_variable jv where exists(select 1 from jbpm4_execution je where je.state_='ended' and je.dbid_=jv.execution_) and jv.lob_=jl.dbid_); 根据这情况,相信大家都知道如何清理了。 |