#2
⏱️ 4180.69 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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:
["snacks",744,107,26,475,669,183,true,744,107,26,475,669,183]
#3
⏱️ 1353.27 мс
select * from "master_products" where "barcode" is not null and "category_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:
["snacks",744,107,26,475,669,183,true,744,107,26,475,669,183]
#4
⏱️ 14.73 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[108808721,108787969,89331054,74076446,72978997,63265682,8775798,8775778,8775717,8775540,7450881,7450863,7443272,7443271,7443269,7442349,7442100,7438842,5127697,4987566,4985151,4606488,4523958,4432652,4272168,4018932,3976565,3920115,3700874,3639142,3556383,3052959,true,744,107,26,475,669,183]
#6
⏱️ 24.6 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[108808721,108787969,89331054,74076446,72978997,63265682,8775798,8775778,8775717,8775540,7450881,7450863,7443272,7443271,7443269,7442349,7442100,7438842,5127697,4987566,4985151,4606488,4523958,4432652,4272168,4018932,3976565,3920115,3700874,3639142,3556383,3052959,0,744,107,26,475,669,183]