cancel
Showing results for 
Search instead for 
Did you mean: 

Indexes on ACT_RU_VARIABLE will improve performance

mamue
Champ in-the-making
Champ in-the-making
Hi,

during jMeter tests with many open processes I found two indexes
which will improve performance significantly if there are many rows (1m+) in table ACT_RU_VARIABLE:

CREATE INDEX ACT_RU_VARIABLE_IDX1 ON ACT_RU_VARIABLE (BYTEARRAY_ID_);
CREATE INDEX ACT_RU_VARIABLE_IDX2 ON ACT_RU_VARIABLE (EXECUTION_ID_);


The first index improves performance when deleting rows from table ACT_GE_BYTEARRAY:
Before a row can be deleted the database has to check the foreign key constraint on column ACT_RU_VARIABLE.BYTEARRAY_ID_.
Without index this results in a time-consuming full table scan of column ACT_RU_VARIABLE.BYTEARRAY_ID_ for the ID_ of the row to be deleted.

What about adding these two indexes to Activiti?

Kind regards,
Markus Mueller

2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
What database did you test this on?

mamue
Champ in-the-making
Champ in-the-making
We did most of our tests with PostgreSQL 9.2.
But the need to check if a record is referenced by any foreign keys seems to be RDBMS independent.
HTH

Sorry for my response being so late.

Kind regards,
Markus Müller