Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(coderd/database): add fk index for workspace_agent_scripts #12791

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

Conversation

mafredri
Copy link
Member

I noticed we were missing this index while looking at query
performances, we were doing sequential scans on the table via the
GetWorkspaceAgentScriptsByAgentIDs query, which is relatively fast
whilst the table is small, but at 8.5k calls/hour in our dogfood
instance, it will become problematic eventually.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @mafredri and the rest of your teammates on Graphite Graphite

@mafredri mafredri force-pushed the mafredri/03-28-fix_coderd_database_add_fk_index_for_workspace_agent_scripts_ branch from a64e13f to de32125 Compare March 28, 2024 11:09
@mafredri mafredri marked this pull request as ready for review March 28, 2024 11:09
@mafredri mafredri requested review from johnstcn and mtojek March 28, 2024 11:09
I noticed we were missing this index while looking at query
performances, we were doing sequential scans on the table via the
`GetWorkspaceAgentScriptsByAgentIDs` query, which is relatively fast
whilst the table is small, but at 8.5k calls/hour in our dogfood
instance, it will become problematic eventually.
@mafredri mafredri force-pushed the mafredri/03-28-fix_coderd_database_add_fk_index_for_workspace_agent_scripts_ branch from de32125 to f33ca15 Compare March 28, 2024 12:06
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mafredri mafredri merged commit d50c20c into main Mar 28, 2024
@mafredri mafredri deleted the mafredri/03-28-fix_coderd_database_add_fk_index_for_workspace_agent_scripts_ branch March 28, 2024 12:31
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants