notify_credentials was flattening a queryset when it shouldn't have, which was exploding a large query all into memory. Hopefully this will help with that.