You should be able to filter stores based on the Product attribute and then prefetch_related from the extracted objects.
Store.objects.filter(product__name="product_name").prefetch_related('product')
This should hit the database the least number of times to achieve what you are looking for - twice.
Further documentation can be found here .
source share