#2
⏱️ 344 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_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:
["grocery","baking_spices",221,11,442,686,1368,true,221,11,442,686,1368]
#3
⏱️ 98.16 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_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:
["grocery","baking_spices",221,11,442,686,1368,true,221,11,442,686,1368]
#4
⏱️ 6.83 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[1472107,1434643,1432364,1427804,1419976,1419974,256300,182689,168014,158192,135564,134865,132636,132009,131476,130832,129643,128821,127942,124029,114016,113719,112045,111384,109958,108671,108607,108606,106969,106967,106789,106442,true,221,11,442,686,1368]
#6
⏱️ 1.94 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[1472107,1434643,1432364,1427804,1419976,1419974,256300,182689,168014,158192,135564,134865,132636,132009,131476,130832,129643,128821,127942,124029,114016,113719,112045,111384,109958,108671,108607,108606,106969,106967,106789,106442,0,221,11,442,686,1368]
#9
⏱️ 4.58 мс
select store_id, count(*) as total from "deals" where "store_id" in (?, ?, ?, ?, ?) and "is_active" = ? and ("expires_at" is null or "expires_at" >= ?) group by "store_id"
Bindings:
[221,11,442,686,1368,true,"2026-09-08T05:02:10.981480Z"]