When you do this, underneath the hood Django is reading in all of those entity fields, parsing all of the json of the entity meta, and doing a bunch of unneeded work everytime an email is sent. Doing this should be equivalent and much more efficient:

```python
dont_sent_to = frozenset(Unsubscribed.objects.filter(unsubscribed_from=email.email_type).values_list('entity', flat=True))

send_to = (entity for entity in all_entities if entity.id not in dont_sent_to)  # or use ifilter instead
```

You could also try to structure it all as a set operation, but you will also have to built a map of entity ids to entities and then access that map O(n) times as well