Skip to content

Commit

Permalink
[incubator-kie-issues#1049] Add index to ProcessInstanceLog table to …
Browse files Browse the repository at this point in the history
…improve LogCleanupCommand performance (#2432)

* [incubator-kie-issues#1049] Add index to ProcessInstanceLog table to improve LogCleanupCommand performance

* Omit new index in H2 as it lacks support for filtered index
  • Loading branch information
martinweiler authored Jul 29, 2024
1 parent d172cf3 commit 4f739f2
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down Expand Up @@ -837,4 +838,4 @@
create index IDX_CaseFileDataLog_caseId on CaseFileDataLog(caseId);
create index IDX_CaseFileDataLog_itemName on CaseFileDataLog(itemName);



Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down Expand Up @@ -837,4 +838,4 @@
create index IDX_CaseFileDataLog_itemName on CaseFileDataLog(itemName);




Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ create index IDX_PInstLog_parentPInstId on ProcessInstanceLog (parentProcessInst
create index IDX_PInstLog_pId on ProcessInstanceLog (processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog (processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog (processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog (processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog (processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog (start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,8 @@
go
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId)
go
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4)
go
create index IDX_PInstLog_pName on ProcessInstanceLog(processName)
go
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
create index IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4)
go

0 comments on commit 4f739f2

Please sign in to comment.