mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: add index for GetProvisionerLogsByIDBetween (#5020)
This commit is contained in:
@@ -8,7 +8,7 @@ WHERE
|
||||
AND (
|
||||
id > @created_after
|
||||
OR id < @created_before
|
||||
) ORDER BY id;
|
||||
) ORDER BY id ASC;
|
||||
|
||||
-- name: InsertProvisionerJobLogs :many
|
||||
INSERT INTO
|
||||
|
||||
@@ -23,9 +23,9 @@ WHERE
|
||||
AND nested.completed_at IS NULL
|
||||
AND nested.provisioner = ANY(@types :: provisioner_type [ ])
|
||||
ORDER BY
|
||||
nested.created_at FOR
|
||||
UPDATE
|
||||
SKIP LOCKED
|
||||
nested.created_at
|
||||
FOR UPDATE
|
||||
SKIP LOCKED
|
||||
LIMIT
|
||||
1
|
||||
) RETURNING *;
|
||||
|
||||
Reference in New Issue
Block a user