Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde32125

Browse files
committed
fix(coderd/database): add fk index forworkspace_agent_scripts
I noticed we were missing this index while looking at queryperformances, we were doing sequential scans on the table via the`GetWorkspaceAgentScriptsByAgentIDs` query, which is relatively fastwhilst the table is small, but at 8.5k calls/hour in our dogfoodinstance, it will become problematic eventually.
1 parentd734f3f commitde32125

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROPINDEX workspace_agent_scripts_workspace_agent_id_idx;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CREATEINDEXworkspace_agent_scripts_workspace_agent_id_idxON workspace_agent_scripts (workspace_agent_id);
2+
3+
COMMENT ON INDEX workspace_agent_scripts_workspace_agent_id_idx IS'Foreign key support index for faster lookups';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp