#2
⏱️ 153.11 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_slug" = ? and (exists (select 1 from "store_prices" where "store_prices"."master_product_id" = "master_products"."id" and "store_prices"."store_id" in (?)) or exists (select 1 from "deals" where "deals"."master_product_id" = "master_products"."id" and "deals"."is_active" = ? and "deals"."store_id" in (?)))
Bindings:
["meat","deli_sausages",287,true,287]
#3
⏱️ 13.48 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_slug" = ? and (exists (select 1 from "store_prices" where "store_prices"."master_product_id" = "master_products"."id" and "store_prices"."store_id" in (?)) or exists (select 1 from "deals" where "deals"."master_product_id" = "master_products"."id" and "deals"."is_active" = ? and "deals"."store_id" in (?))) order by CASE WHEN master_products.image_url IS NOT NULL AND master_products.image_url != '' THEN 0 ELSE 1 END, "master_products"."id" desc limit 32 offset 0
Bindings:
["meat","deli_sausages",287,true,287]
#4
⏱️ 7.41 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[1455514,110704,110013,1912364,1912207,1908813,1460875,1460874,1456550,1456544,1456541,1456540,1456539,1456538,1456537,1456536,1456535,1456534,1455523,1455520,1455508,1455218,1454791,1454790,1454785,1454783,1454048,1454047,1454033,1454031,1454030,1454027,true,287]
#6
⏱️ 2.88 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?)
Bindings:
[1455514,110704,110013,1912364,1912207,1908813,1460875,1460874,1456550,1456544,1456541,1456540,1456539,1456538,1456537,1456536,1456535,1456534,1455523,1455520,1455508,1455218,1454791,1454790,1454785,1454783,1454048,1454047,1454033,1454031,1454030,1454027,0,287]