#1
⏱️ 122.81 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bat-yam"]
#2
⏱️ 174.91 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) and master_products.id IN (
SELECT DISTINCT ON (COALESCE(canonical_product_id, -id)) id
FROM master_products
WHERE category_slug = ?
ORDER BY COALESCE(canonical_product_id, -id),
CASE WHEN image_url IS NOT NULL AND image_url != '' THEN 0 ELSE 1 END,
id DESC
)
Bindings:
["produce","herbs_mushrooms",751,124,232,1121,1250,1260,618,318,409,459,676,675,677,true,751,124,232,1121,1250,1260,618,318,409,459,676,675,677,"produce"]
#3
⏱️ 106.87 мс
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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?))) and master_products.id IN (
SELECT DISTINCT ON (COALESCE(canonical_product_id, -id)) id
FROM master_products
WHERE category_slug = ?
ORDER BY COALESCE(canonical_product_id, -id),
CASE WHEN image_url IS NOT NULL AND image_url != '' THEN 0 ELSE 1 END,
id DESC
) 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:
["produce","herbs_mushrooms",751,124,232,1121,1250,1260,618,318,409,459,676,675,677,true,751,124,232,1121,1250,1260,618,318,409,459,676,675,677,"produce"]
#4
⏱️ 3.48 мс
select * from "canonical_products" where "canonical_products"."id" in (5, 215, 235, 308)
#5
⏱️ 4.78 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?)
Bindings:
[308,5,215,235]
#6
⏱️ 12.63 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4991092,4989961,4987921,4987920,4987918,4987624,4987231,4986722,4986606,4986434,4985340,4984012,4983887,4983785,4983721,4983719,4983613,4039527,3777603,3771787,3698258,2710285,2671026,2670964,2666758,2666027,2664001,2633097,2631399,2607777,2604820,2604816,4983654,112366,112361,4525248,true,751,124,232,1121,1250,1260,618,318,409,459,676,675,677]
#7
⏱️ 9.55 мс
select min(sp.id) as best_sp_id from "store_prices" as "sp" where "sp"."master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "sp"."price" > ? and "sp"."store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) group by sp.store_id, CASE WHEN sp.master_product_id = 4983654 THEN 4983719 WHEN sp.master_product_id = 4983719 THEN 4983719 WHEN sp.master_product_id = 112366 THEN 2604820 WHEN sp.master_product_id = 2604820 THEN 2604820 WHEN sp.master_product_id = 2604816 THEN 2604816 WHEN sp.master_product_id = 112361 THEN 2604816 WHEN sp.master_product_id = 4983721 THEN 4983721 WHEN sp.master_product_id = 4525248 THEN 4983721 ELSE sp.master_product_id END limit 500
Bindings:
[4991092,4989961,4987921,4987920,4987918,4987624,4987231,4986722,4986606,4986434,4985340,4984012,4983887,4983785,4983721,4983719,4983613,4039527,3777603,3771787,3698258,2710285,2671026,2670964,2666758,2666027,2664001,2633097,2631399,2607777,2604820,2604816,4983654,112366,112361,4525248,0,751,124,232,1121,1250,1260,618,318,409,459,676,675,677]
#8
⏱️ 10.86 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2376716,2378550,2378564,2378572,2378580,2378608,2368414,2374029,2917228,2917232,2919655,2919291,3225582,3223786,3223255,3223296,2915872,3223427,3223529,3223654,3224982,3226076,3226248,3226364,3226873,3227266,3227560,3227562,3227563,3229603,3230734,1746548,1746553,1742426,6792683,6795173,6797001,6799916,6800615,6790758]
#9
⏱️ 3.17 мс
select * from "stores" where "stores"."id" in (459, 618, 751)
#10
⏱️ 2.71 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"bat-yam"]
#11
⏱️ 9.75 мс
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:
[751,124,232,1121,1250,1260,618,459,676,675,677,true,"2026-09-08T05:46:08.582592Z"]
#12
⏱️ 4.97 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bat-yam"]
#13
⏱️ 1.08 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#14
⏱️ 3.67 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]