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

Research db performance part 1 #339

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion internal/api/controllers/public/runsList.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (this *controllers) ApiRunsList(ctx echo.Context, params ApiRunsListParams)
}

var total int64
countResult := queryBuilder.Count(&total)
countResult := queryBuilder.Model(&dbRuns).Count(&total)

if countResult.Error != nil {
instrumentation.PlaybookRunReadError(ctx, countResult.Error)
Expand Down
1 change: 1 addition & 0 deletions migrations/014_drop-index-labels-playbook-run.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE INDEX runs_btree_labels_playbook_run_index ON runs USING btree((labels->>'playbook-run'));
1 change: 1 addition & 0 deletions migrations/014_drop-index-labels-playbook-run.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP INDEX runs_btree_labels_playbook_run_index;
Loading