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 ( WHERE id IN (
SELECT id SELECT id
FROM derivation_source_files FROM derivation_source_files
WHERE NOT EXISTS ( WHERE id NOT IN (
SELECT 1 SELECT derivation_source_file_id
FROM derivation_sources FROM derivation_sources
WHERE derivation_source_file_id = derivation_source_files.id
) )
LIMIT 100 LIMIT 100
) )