Performance in history service

Hi!
I have some some processes, that must start every day. But they have some restricions to start based on complex object and process instance start date.

For example we working with customer request. Customers buy some plan, like 1000 request in 1 month. And by human resource reasons we cant run more than 10000 request in 1 day.
Request income every 10 minutes, max 100 in time. If we cant run request (by HR reason) we just ignore it.

So i need make 1 (or 2) agregation query for history service for every request - one for HR reason, second for client plan reason. So in max we have 28800 querys in day, for big key-value tables. And i think performance can be problem here.

I will mock all this things and check, but before i what know what you guys think about this idea to store complex object and qurey them by history service?
I have alternative - i can made some tables in DB and read-write manually, but i didnt what add more elements to my solution, if camunda will handle my case normal

Hi @kotskin,

running 28800 queries a day you have 3 seconds per query, if we assume normal distribution.

If you query for name and value, you should get an answer quickly. If it would get slow, you can add an index with name and value to improve it.

But you could not search for complex objects as they are saved in the ACT_GE_BYTEARRAY table. Think about a good shortcut of the values, eg. customerId and startdate and add simple typed process variables for them.

Hope this helps, Ingo

Hi Ingo, great idea, thanks!