fix: add index for GetProvisionerLogsByIDBetween (#5020)

This commit is contained in:
Colin Adler
2022-11-16 14:32:29 -06:00
committed by GitHub
parent da758ba712
commit e7f1192614
6 changed files with 12 additions and 8 deletions

View File

@ -2370,7 +2370,7 @@ WHERE
AND (
id > $2
OR id < $3
) ORDER BY id
) ORDER BY id ASC
`
type GetProvisionerLogsByIDBetweenParams struct {
@ -2488,9 +2488,9 @@ WHERE
AND nested.completed_at IS NULL
AND nested.provisioner = ANY($3 :: provisioner_type [ ])
ORDER BY
nested.created_at FOR
UPDATE
SKIP LOCKED
nested.created_at
FOR UPDATE
SKIP LOCKED
LIMIT
1
) RETURNING id, created_at, updated_at, started_at, canceled_at, completed_at, error, organization_id, initiator_id, provisioner, storage_method, type, input, worker_id, file_id