Skip to content

Commit

Permalink
JBPM-5186 - Database Queries perform poorly on VariableInstanceLog an…
Browse files Browse the repository at this point in the history
…d NodeInstanceLog (#492)
  • Loading branch information
mrietveld authored and mswiderski committed Jul 5, 2016
1 parent 297665e commit 8292ab3
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/db2/db2-jbpm-schema.sql
Expand Up @@ -731,3 +731,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/derby/derby-jbpm-schema.sql
Expand Up @@ -732,3 +732,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/h2/h2-jbpm-schema.sql
Expand Up @@ -733,3 +733,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/hsqldb/hsqldb-jbpm-schema.sql
Expand Up @@ -734,3 +734,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/mysql5/mysql5-jbpm-schema.sql
Expand Up @@ -779,3 +779,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
Expand Up @@ -779,3 +779,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/oracle/oracle-jbpm-schema.sql
Expand Up @@ -791,3 +791,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
Expand Up @@ -792,3 +792,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
Expand Up @@ -734,3 +734,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
Expand Up @@ -734,3 +734,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey);

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);
8 changes: 8 additions & 0 deletions jbpm-installer/db/ddl-scripts/sybase/sybase-jbpm-schema.sql
Expand Up @@ -822,3 +822,11 @@
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date)
create index IDX_PInstLog_status on ProcessInstanceLog(status)
create index IDX_PInstLog_correlation on ProcessInstanceLog(correlationKey)

create index IDX_VInstLog_pInstId on VariableInstanceLog(processInstanceId);
create index IDX_VInstLog_varId on VariableInstanceLog(variableId);
create index IDX_VInstLog_pId on VariableInstanceLog(processId);

create index IDX_NInstLog_pInstId on NodeInstanceLog(processInstanceId);
create index IDX_NInstLog_nodeType on NodeInstanceLog(nodeType);
create index IDX_NInstLog_pId on NodeInstanceLog(processId);

0 comments on commit 8292ab3

Please sign in to comment.