Есть такой запрос:
pcollections = PCollection.objects.filter(
product__category__title__in = filter_items_active['categories_get'] ,
product__color__title__in = filter_items_active['colors_get'] ,
product__surface__title__in = filter_items_active['surfaces_get'] ,
product__width_height__title__in = filter_items_active['width_heights_get'] ,
product__price_type__title__in = filter_items_active['pricetypes_get'] ,
fabrika__title__in = filter_items_active['fabriks_get'] ,
product__appointment__title__in = filter_items_active['appointments_get'] ,
product__premises__title__in = filter_items_active['premises_get'] ,
fabrika__country__title__in = filter_items_active['countrys_get'] ,
product__picture__title__in = filter_items_active['pictures_get'] ,
product__form__title__in = filter_items_active['forms_get'] ,
product__rectificate__in = filter_items_active['rectificate_get'] ,
product__stock__in = filter_items_active['stock_get']
).distinct()
Выполняется очень медленно. Подскажите как можно его оптимизировать?