Problem Description:
Historic Activity Statistics Query cannot use any indexes. If the history table contains many entries, the query performance decreases.
Impacts responsiveness of Cockpit since this query is the one used to populate the counts on the process definition page.
Solution:
Maybe the following index can improve the performance:
create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST(PROC_DEF_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_);