fix: index `GetWorkspaceAgentsByResourceIDs` query (#5021)

This commit is contained in:
Colin Adler 2022-11-16 14:40:57 -06:00 committed by GitHub
parent e7f1192614
commit 66d20cabac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View File

@ -632,6 +632,8 @@ CREATE UNIQUE INDEX users_email_lower_idx ON users USING btree (lower(email)) WH
CREATE UNIQUE INDEX users_username_lower_idx ON users USING btree (lower(username)) WHERE (deleted = false);
CREATE INDEX workspace_agents_resource_id_idx ON workspace_agents USING btree (resource_id);
CREATE INDEX workspace_resources_job_id_idx ON workspace_resources USING btree (job_id);
CREATE UNIQUE INDEX workspaces_owner_id_lower_idx ON workspaces USING btree (owner_id, lower((name)::text)) WHERE (deleted = false);

View File

@ -0,0 +1 @@
DROP INDEX workspace_agents_resource_id_idx;

View File

@ -0,0 +1 @@
CREATE INDEX workspace_agents_resource_id_idx ON workspace_agents USING btree (resource_id);