#2
⏱️ 232.29 мс
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","fish",287,true,287]
#3
⏱️ 81.99 мс
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","fish",287,true,287]
#4
⏱️ 28.47 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[100907,97881,95541,95540,95316,95314,95309,95305,95302,95300,95299,95298,95297,95295,95294,95293,1946762,1909771,1909611,1909256,1908832,1908577,1908429,1456165,1456164,1456163,1456162,1456161,1456158,1456157,1454750,1454742,true,287]
#6
⏱️ 24.9 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?)
Bindings:
[100907,97881,95541,95540,95316,95314,95309,95305,95302,95300,95299,95298,95297,95295,95294,95293,1946762,1909771,1909611,1909256,1908832,1908577,1908429,1456165,1456164,1456163,1456162,1456161,1456158,1456157,1454750,1454742,0,287]