From 48ae9b293994959f81aeb8abc982efb47ea723c1 Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 11 Jan 2014 18:44:23 +0000 Subject: [PATCH] remove_session --- Notes | 6 ++++++ 1 file changed, 6 insertions(+) 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.