Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading