We are currently experiencing a major issue regarding the ACT_HI_PROCINST historization table from Activiti.
The table has ~15 mio rows. We are querying the table in one of our activiti processes and since the table is huge, the time to query is really long.
We will be cleaning up the table to get rid of the very old data, but apart from that we would like to add an index on the PROC_DEF_ID_ column from the table. This improves the query times dramatically!
Three questions arise:
Thanx a lot.
Andreea
Hi Andreaa,
Go ahead and add the index, it will cause no problems at all.
In fact, for environments that retain a large history (such as yours), it is typical that you would add this index.
As to why it isn't there by default, generally you would not want to maintain millions of rows of history data. More often than not you would move it into an archive store.
Regards,
Greg
Agree with what Greg mentioned above. If historical information is required for other applications/processes, it is best to be stored externally in a business data store OR internally in the same database but custom tables (See Activiti User Guide for more details on this option) which are optimized for your queries.
Though this post is a bit old, it is still very relevant when building/designing business processes - http://airquill.io/2014/06/29/Storing-data-in-processes.htmlhttp://airquill.io/2014/06/29/Storing-data-in-processes.html
Regards,
Ciju
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.