We are running JBPM 3 as part of a content management platform, using MySQL as the underlying DB, We are starting to suffer some performance issues which I believe are mainly due to table bloat in the underlying JBPM tables (primarily JBPM_VARIABLEINSTNACE - it has > 7M rows).
We have developed the attached stored procedure in MySQL. Can anyone comment if they believe this is 'safe', of if there is another approach to groom out data from JBPM tables once a process instance is complete?
PurgeVarInstance.sql.doc 27.0 K
It is standard functionality in jBPM3 that all completed processes (history information) remains in the database. It is stated in the docs (enterprise docs) that you need to decide within your organization what you want to do with this, something like this:
- don't care about old history, just remove/delete.
- have BAM reporting in place so have to keep, then migrate out to a different format/location/db to allow for continued reporting.
- apply enterprise process (for example, I worked in an enterprise that applied data warehousing techniques) to collect and store for reporting all history data
- leave it in place, but be prepared to eventually have to enlarge your DB machine! ;-)
That about covers it. I looked at your doc, but I am not sure anymore exactly what you all can clean out of your tables.