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
  • Loading branch information
martinweiler committed Jul 12, 2024
1 parent f768ebb commit 1d3d728
Show file tree
Hide file tree
Showing 22 changed files with 26 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 @@ -810,6 +810,7 @@
create index if not exists IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index if not exists IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index if not exists IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index if not exists IDX_PInstLog_pInstId_status ON ProcessInstanceLog (processInstanceId, status) WHERE status IN (0,1,4);
create index if not exists IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index if not exists IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index if not exists 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 @@
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 1d3d728

Please sign in to comment.