From b73e0b46225f447b08bb5b21cd7c1f199f9ff701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sun, 29 Dec 2024 14:46:31 +0100 Subject: [PATCH] Order orphans by path It costs more cycles, but the SHA-1 they got implicitly ordered by is pseudo-random. --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 3afe941..8a82916 100644 --- a/main.go +++ b/main.go @@ -687,7 +687,8 @@ func getOrphans() (result []webOrphan, err error) { FROM orphan AS o JOIN image AS i ON o.sha1 = i.sha1 LEFT JOIN tag_assignment AS ta ON o.sha1 = ta.sha1 - GROUP BY o.sha1`) + GROUP BY o.sha1 + ORDER BY path`) if err != nil { return nil, err }