I think it would be worth doing an explain and checking whether the subselect performs reasonably at the same time as you're doing your memory investigation. If neither one will work, you can always iterate through both lists and do the exclude manually without bringing both sets into memory.