#2
⏱️ 302.96 мс
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",599,121,197,242,353,501,true,599,121,197,242,353,501]
#3
⏱️ 220.65 мс
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",599,121,197,242,353,501,true,599,121,197,242,353,501]
#4
⏱️ 30.79 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[4984771,2067877,813918,784427,784425,784004,784002,726749,692746,303593,264936,264842,256724,251286,245555,244312,243098,242656,242189,208252,208251,207295,200521,200520,200517,200516,200515,200514,200513,200512,200510,200509,true,599,121,197,242,353,501]
#6
⏱️ 26.41 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[4984771,2067877,813918,784427,784425,784004,784002,726749,692746,303593,264936,264842,256724,251286,245555,244312,243098,242656,242189,208252,208251,207295,200521,200520,200517,200516,200515,200514,200513,200512,200510,200509,0,599,121,197,242,353,501]