perf(coderd/database): add index on workspace_app_statuses.app_id (#21099)

This commit is contained in:
Mathias Fredriksson
2025-12-04 17:56:13 +02:00
committed by GitHub
parent d9159103cd
commit cfdd4a9b88
6 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -71,7 +71,8 @@ VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
RETURNING *;
-- name: GetWorkspaceAppStatusesByAppIDs :many
SELECT * FROM workspace_app_statuses WHERE app_id = ANY(@ids :: uuid [ ]);
SELECT * FROM workspace_app_statuses WHERE app_id = ANY(@ids :: uuid [ ])
ORDER BY created_at DESC, id DESC;
-- name: GetLatestWorkspaceAppStatusByAppID :one
SELECT *