#2
⏱️ 859.22 мс
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:
["grocery","sauces_oils",462,470,521,true,462,470,521]
#3
⏱️ 436.67 мс
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:
["grocery","sauces_oils",462,470,521,true,462,470,521]
#4
⏱️ 7.79 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[3837230,2991635,2742043,2670760,2669776,2634027,1477277,1457784,1434552,912218,681470,440827,409783,321497,300702,297432,274786,259343,200908,200449,200446,200423,193602,184907,184899,173524,171156,170547,169483,169354,167769,167441,true,462,470,521]
#6
⏱️ 6.13 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?)
Bindings:
[3837230,2991635,2742043,2670760,2669776,2634027,1477277,1457784,1434552,912218,681470,440827,409783,321497,300702,297432,274786,259343,200908,200449,200446,200423,193602,184907,184899,173524,171156,170547,169483,169354,167769,167441,0,462,470,521]
#9
⏱️ 33.09 мс
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:
[462,470,521,true,"2026-09-08T07:06:49.495776Z"]