#1
⏱️ 140.61 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"herzliya"]
#2
⏱️ 1596.37 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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",2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,383,true,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,383,"produce"]
#3
⏱️ 648.39 мс
select * from "master_products" where "barcode" is not null and "category_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",2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,383,true,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,383,"produce"]
#4
⏱️ 10.97 мс
select * from "canonical_products" where "canonical_products"."id" in (28, 263)
#5
⏱️ 9.98 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[28,263]
#6
⏱️ 226.73 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8506300,8338309,7518346,7516636,7443254,7439517,7431628,5280320,4991109,4991108,4991102,4991097,4991094,4991092,4991049,4990825,4990823,4990804,4990789,4990619,4990596,4990576,4990456,4990129,4989961,4989781,4989777,4989772,4989767,4989766,4988820,4988698,3619438,622184,190924,154941,95625,97843,150735,190883,96304,109535,true,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,383]
#7
⏱️ 10.25 мс
select * from "stores" where "stores"."id" in (2, 358, 383, 542)
#8
⏱️ 32.45 мс
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 = 3619438 THEN 8506300 WHEN sp.master_product_id = 8506300 THEN 8506300 WHEN sp.master_product_id = 622184 THEN 8506300 WHEN sp.master_product_id = 190924 THEN 8506300 WHEN sp.master_product_id = 154941 THEN 8506300 WHEN sp.master_product_id = 95625 THEN 8506300 WHEN sp.master_product_id = 97843 THEN 8506300 WHEN sp.master_product_id = 150735 THEN 5280320 WHEN sp.master_product_id = 5280320 THEN 5280320 WHEN sp.master_product_id = 190883 THEN 5280320 WHEN sp.master_product_id = 96304 THEN 5280320 WHEN sp.master_product_id = 109535 THEN 5280320 ELSE sp.master_product_id END limit 500
Bindings:
[8506300,8338309,7518346,7516636,7443254,7439517,7431628,5280320,4991109,4991108,4991102,4991097,4991094,4991092,4991049,4990825,4990823,4990804,4990789,4990619,4990596,4990576,4990456,4990129,4989961,4989781,4989777,4989772,4989767,4989766,4988820,4988698,3619438,622184,190924,154941,95625,97843,150735,190883,96304,109535,0,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,383]
#9
⏱️ 27.27 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6389146,6387997,782226,781555,1290887,1290244,2567223,2567395,2566871,2565374,2567084,358946,363096,3582178,3235812,3235934,3236880,3236881,3236886,3236891,3236895,3237075,3237243,3237570,3237690,3237710,3237733,3237903,3237918,3237937,3237939,3238163,3238244,3238246,3238249,3238254,3238260,3238261,2925978,2926037,487099,486463]
#10
⏱️ 12.01 мс
select * from "stores" where "stores"."id" in (2, 358, 383, 494, 542, 560, 626, 761)
#11
⏱️ 11.67 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"herzliya"]
#12
⏱️ 64.32 мс
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:
[2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,198,494,560,652,1380,358,true,"2026-09-08T07:06:34.386147Z"]
#13
⏱️ 9.72 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["herzliya"]
#14
⏱️ 8.25 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 10.31 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]