The problem is, I don't see how to avoid it. For free apps, just joining with the addons region exclusion table is ok, but for paid apps, https://bugzilla.mozilla.org/show_bug.cgi?id=909532 added price tier checking (and introduce the method I'm using), I assume specifically because it's annoying to maintain region exclusions in database for payments. 

I thought about doing the join + exclude to automatically exclude free apps in the main query, then looping over all apps once they have been fetched to take care of paid apps, but this isn't going to scale well either for paid apps... 

Maybe just caching get_excluded_region_ids() for each app ? cc @andymckay and @muffinresearch for ideas.