Speed up deleting derivation sources

This commit is contained in:
Christopher Baines 2024-06-20 17:07:41 +01:00
parent 530f58b59c
commit 84a2ad5b25

View file

@ -435,10 +435,9 @@ DELETE FROM derivation_source_files
WHERE id IN (
SELECT id
FROM derivation_source_files
WHERE NOT EXISTS (
SELECT 1
WHERE id NOT IN (
SELECT derivation_source_file_id
FROM derivation_sources
WHERE derivation_source_file_id = derivation_source_files.id
)
LIMIT 100
)