#2
⏱️ 114.8 мс
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:
["household","cleaning_paper",101,275,true,101,275]
#3
⏱️ 83.34 мс
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:
["household","cleaning_paper",101,275,true,101,275]
#4
⏱️ 19.09 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[753207,684935,601321,498357,412867,324308,288193,245837,245810,244554,174728,169088,133051,133050,129829,128727,128704,128310,128005,124324,113900,113769,109085,108497,108369,108154,108136,108118,107769,107768,107761,107757,true,101,275]
#6
⏱️ 7.37 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?)
Bindings:
[753207,684935,601321,498357,412867,324308,288193,245837,245810,244554,174728,169088,133051,133050,129829,128727,128704,128310,128005,124324,113900,113769,109085,108497,108369,108154,108136,108118,107769,107768,107761,107757,0,101,275]