#1
⏱️ 98.02 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramat-hasharon"]
#2
⏱️ 273.33 мс
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","fruits",646,142,true,646,142,"produce"]
#3
⏱️ 122.42 мс
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","fruits",646,142,true,646,142,"produce"]
#4
⏱️ 3.71 мс
select * from "canonical_products" where "canonical_products"."id" in (80)
#5
⏱️ 1.43 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[80]
#6
⏱️ 21.72 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[2257916,2190661,2151263,2136438,2045870,1879673,1453435,948398,945539,713221,639411,598059,497990,496460,436382,362451,362409,362326,327734,327732,311485,247391,247376,128746,124495,124235,114849,114435,110684,106036,105712,105707,109889,true,646,142]
#7
⏱️ 3.87 мс
select * from "stores" where "stores"."id" in (142)
#8
⏱️ 14.02 мс
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 = 2190661 THEN 2190661 WHEN sp.master_product_id = 109889 THEN 2190661 ELSE sp.master_product_id END limit 500
Bindings:
[2257916,2190661,2151263,2136438,2045870,1879673,1453435,948398,945539,713221,639411,598059,497990,496460,436382,362451,362409,362326,327734,327732,311485,247391,247376,128746,124495,124235,114849,114435,110684,106036,105712,105707,109889,0,646,142]
#9
⏱️ 10.44 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5526279,5526284,5528314,5528499,5512289,5542632,5533337,5533339,5512175,5512101,76104267,5511951,10412938,5512082,61886536,5523913,5511979,5512036,5512037,5524394,5511993,80149629]
#10
⏱️ 4.17 мс
select * from "stores" where "stores"."id" in (142)
#11
⏱️ 1.41 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"ramat-hasharon"]
#12
⏱️ 130.72 мс
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:
[646,142,true,"2026-10-22T21:18:43.689221Z"]
#13
⏱️ 4.27 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramat-hasharon"]
#14
⏱️ 4.94 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 7.07 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]