Skip to content

Commit

Permalink
feat: add indexes for improve archived workflow performance. Fixes #8836
Browse files Browse the repository at this point in the history
 (#8860)

Signed-off-by: shirou <shirou.faw@gmail.com>
  • Loading branch information
shirou authored Jun 11, 2022
1 parent 805ab41 commit 107ed93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ mis-configuration.
Failed to register watch for controller config map: error unmarshaling JSON: while decoding JSON: json: unknown field \"args\"
```
## feat: add indexes for improve archived workflow performance. (#8860)
This PR adds indexes to archived workflow tables. This change may cause a long time to upgrade if the user has a large table.
## Upgrading to v3.3
### [662a7295b](https://github.com/argoproj/argo-workflows/commit/662a7295b) feat: Replace `patch pod` with `create workflowtaskresult`. Fixes #3961 (#8000)
Expand Down
3 changes: 3 additions & 0 deletions persist/sqldb/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ func (m migrate) Exec(ctx context.Context) (err error) {
ansiSQLChange(`create index argo_archived_workflows_i2 on argo_archived_workflows (clustername,instanceid,finishedat)`),
// add argo_archived_workflows name index for prefix searching performance
ansiSQLChange(`create index argo_archived_workflows_i3 on argo_archived_workflows (clustername,instanceid,name)`),
// add indexes for list archived workflow performance. #8836
ansiSQLChange(`create index argo_archived_workflows_i4 on argo_archived_workflows (startedat)`),
ansiSQLChange(`create index argo_archived_workflows_labels_i1 on argo_archived_workflows_labels (name,value)`),
} {
err := m.applyChange(ctx, changeSchemaVersion, change)
if err != nil {
Expand Down

0 comments on commit 107ed93

Please sign in to comment.