#2
⏱️ 386.03 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)))
Bindings:
["snacks",33,188,280,71,351,true,33,188,280,71,351]
#3
⏱️ 350.37 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?, ?, ?, ?, ?)) union (select "master_product_id" from "deals" where "is_active" = ? and "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:
["snacks",33,188,280,71,351,true,33,188,280,71,351]
#4
⏱️ 14.76 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[1461292,1433560,1227637,1197590,726749,398871,367098,349948,281449,270992,264936,264842,256724,252428,251398,251397,251286,245368,244332,244312,243870,243098,242656,242189,208251,199537,181855,181489,180263,171192,169754,169199,true,33,188,280,71,351]
#6
⏱️ 11.25 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[1461292,1433560,1227637,1197590,726749,398871,367098,349948,281449,270992,264936,264842,256724,252428,251398,251397,251286,245368,244332,244312,243870,243098,242656,242189,208251,199537,181855,181489,180263,171192,169754,169199,0,33,188,280,71,351]