diff --git a/Notes b/Notes index fe05999..3cb3ba9 100644 --- a/Notes +++ b/Notes @@ -136,3 +136,9 @@ where file_type = 'f' and checksum is null and instances.session=sessions.id limit 100000; +remove_session: + +select v.id from instances i right outer join versions2 v on +i.version=v.id where i.id is null +is very slow. Do two independent queries and difference via judy? +In any case all the cleanup stuff needs to be outside of the loop.