Details
-
Enhancement
-
Resolution: Obsolete
-
Minor
-
None
-
7.5.0.GA
-
None
-
Description
When using the ProcessService.getWorkItem(id) method, the named query "getNodeInstanceForWorkItem" is used. This query is:
<named-query name="getNodeInstanceForWorkItem"> <query> select new org.jbpm.kie.services.impl.model.NodeInstanceDesc( log.nodeInstanceId, log.nodeId, log.nodeName, log.nodeType, log.externalId, log.processInstanceId, log.date, log.connection, log.type, log.workItemId, log.referenceId, log.nodeContainerId, log.slaDueDate, log.slaCompliance ) from NodeInstanceLog log where log.workItemId=:workItemId and log.type = 0 ORDER BY log.nodeInstanceId, log.id ASC </query> <!-- hint name="org.hibernate.timeout" value="200"/ --> </named-query>
The SQL files in the add-ons for PostgreSQL only create the following indexes:
create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
We also need to create an index for the workItemId column as well.