From 14bf4724dde6222616230923a704a7bf53bd9091 Mon Sep 17 00:00:00 2001 From: ice-myles <96409608+ice-myles@users.noreply.github.com> Date: Tue, 24 Oct 2023 12:18:53 +0300 Subject: [PATCH] Ordering by id instead of hashcode to use index (#29) --- .../update_santa_badges_levels_and_roles_tasks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/scripts/update_santa_badges_levels_and_roles_tasks/update_santa_badges_levels_and_roles_tasks.go b/cmd/scripts/update_santa_badges_levels_and_roles_tasks/update_santa_badges_levels_and_roles_tasks.go index c2c6276..09ba690 100644 --- a/cmd/scripts/update_santa_badges_levels_and_roles_tasks/update_santa_badges_levels_and_roles_tasks.go +++ b/cmd/scripts/update_santa_badges_levels_and_roles_tasks/update_santa_badges_levels_and_roles_tasks.go @@ -117,7 +117,7 @@ func (u *updater) update(ctx context.Context, bugfixStartTimestamp *time.Time) { AND u.username != u.id AND u.created_at < $1 GROUP BY u.id - ORDER BY u.hash_code ASC + ORDER BY u.id ASC LIMIT $2 OFFSET $3` usrs, err := storagepg.Select[eskimoUser](ctx, u.dbEskimo, sql, bugfixStartTimestamp.Time, maxLimit, offset)