#1
⏱️ 109.68 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"afula"]
#2
⏱️ 481.84 мс
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","vegetables",599,121,197,242,353,501,true,599,121,197,242,353,501,"produce"]
#3
⏱️ 299.93 мс
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","vegetables",599,121,197,242,353,501,true,599,121,197,242,353,501,"produce"]
#4
⏱️ 15.8 мс
select * from "canonical_products" where "canonical_products"."id" in (139, 194)
#5
⏱️ 10.96 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[194,139]
#6
⏱️ 32.27 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[7550923,7549019,7529435,7455068,7454739,7446739,7431628,6908951,4991109,4991108,4991102,4991097,4991094,4991049,4990825,4990576,4990456,4989781,4989777,4989772,4989767,4989766,4988820,4988698,4988403,4987625,4987518,4987434,4987431,4987359,4987210,4987208,96458,2712622,133472,4029456,true,599,121,197,242,353,501]
#7
⏱️ 11.52 мс
select * from "stores" where "stores"."id" in (121, 353)
#8
⏱️ 19.33 мс
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 = 96458 THEN 7454739 WHEN sp.master_product_id = 7454739 THEN 7454739 WHEN sp.master_product_id = 2712622 THEN 7454739 WHEN sp.master_product_id = 133472 THEN 7454739 WHEN sp.master_product_id = 4029456 THEN 7529435 WHEN sp.master_product_id = 7529435 THEN 7529435 ELSE sp.master_product_id END limit 500
Bindings:
[7550923,7549019,7529435,7455068,7454739,7446739,7431628,6908951,4991109,4991108,4991102,4991097,4991094,4991049,4990825,4990576,4990456,4989781,4989777,4989772,4989767,4989766,4988820,4988698,4988403,4987625,4987518,4987434,4987431,4987359,4987210,4987208,96458,2712622,133472,4029456,0,599,121,197,242,353,501]
#9
⏱️ 35.75 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6398013,5213568,2598313,2601201,2599319,2598671,2599284,2599666,2597757,2599661,3166736,3166738,3166887,3166959,3166962,3167046,3167153,3167931,3168226,3168348,3169294,3169295,3169300,3169305,3169309,3169984,3170104,3170353,3170577,3170625,3170628,3170633,3170639,3170640]
#10
⏱️ 11.55 мс
select * from "stores" where "stores"."id" in (121, 353, 501, 599)
#11
⏱️ 5.26 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"afula"]
#12
⏱️ 32.59 мс
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:
[599,121,197,242,353,501,true,"2026-09-08T07:07:15.130848Z"]
#13
⏱️ 10.54 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["afula"]
#14
⏱️ 7.14 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 11.53 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]