问题现象: | 审批流库数据量过大,导致运行速度很慢,有没有优化的方案,如需要删除数据库表,请详细说明,谢谢 |
问题原因: | |
解决方案: | 您好, 此问题【经查看数据/测试】现做如下分析与答复: 【问题原因】 使用多年后数据库表会比较大。只能删除以前年度的数据。或升级到10版本会有改善。 【解决方案】 务必做好一个完整帐套的备份。语句仅供参看,执行时需要根据你帐套具体情况修改。拿来直接执行后果自负!! use u8workflow --ctk_state=9、99 为无效或已经没有对应审批任务的记录、2为已经完成记录 009为帐套好需要改为你自己的 delete from table_task where ctk_state=2 and caccountid=009 and cendtime<='2009-12-31' --任务消息 delete from table_task where ctk_state=2 and caccountid=009 and cendtime<='2010-12-31' delete from table_task where ctk_state in ('9','99') truncate table wf_currentlog --清除09-10年数据将导致无法查看审批进程 delete from wfaudit where accountid='009' and operationdate<='2010-12-31 00:00:00.000' --删除09-10将导致审批流无法弃审、流程修改等 delete from wf_flowstate where piid in (select piid from wf_activeflow where cacc_id=009 and starttime<='2009-12-31') delete from wf_flowstate where piid in (select piid from wf_activeflow where cacc_id=009 and starttime<='2010-12-31') delete from wf_activeflow where cacc_id=009 and starttime<='2009-12-31' delete from wf_activeflow where cacc_id=009 and starttime<='2010-12-31' Select * from table_task_relatioin where id not in (select ID from table_task where ctk_state in ('9','99')) 【注意事项】修改前请务必做好数据备份; 【提示】如有问题,敬请及时邮件联系 |
相关补丁: | |
版本: | 8.90 |
模块: | 工作流 |
产品: | 公共平台 |
问题名称: | 审批流数据过大 |
最后更新: | 2011-12-07 23:40:56 |