cancel
Showing results for 
Search instead for 
Did you mean: 

How to decrease SQL requests in Activiti?

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi there,

I re-post a question related to performance optimization from an user of the Activiti plugin here from the following URL:
https://groups.google.com/forum/#!topic/grails-activiti-plugin/ymkd6wl0O9s

After configuring sql log with log4jdbc in my app, I see a lot of requests to database, and my app stops after many concurrent users !

I see after calling start(params) or completeTask(params) in my controller, it's about 20 SQL requests to database, there is no process variable (only two insert into ACT_RU_VARIABLE …). sometimes it's going on 60 sql request if there is many variables in my params object. Is this normal ?

Also when I call start(params) in first time, I see a loop of sql requests (select * from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = '4201' and KEY_ = xxxxx ) throughout all my process definitions.

How can I decrease these sql requests ?

Thank you so much.



1 REPLY 1

trademak
Star Contributor
Star Contributor
When the history level is set to full, yes there can be quite a number of SQL statements being executed. For every variable 2 records are written to the history tables for example. When you complete a task and you are executing a number of automatic steps afterwards, then for every activity executed there will be an entry in the history activity table. If you want to reduce the amount of SQL statements being executed, the history level should be set to none.

Best regards,