#1
⏱️ 163.96 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rosh-haayin"]
#2
⏱️ 456.97 мс
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",33,188,280,71,351,true,33,188,280,71,351,"produce"]
#3
⏱️ 477.65 мс
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",33,188,280,71,351,true,33,188,280,71,351,"produce"]
#4
⏱️ 8.83 мс
select * from "canonical_products" where "canonical_products"."id" in (6, 20, 64, 128, 205, 347)
#5
⏱️ 7.95 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[205,6,20,128,64,347]
#6
⏱️ 20.51 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[2290837,1961904,1954257,1939916,1928902,1928253,1926121,1916627,1915867,1915186,1912226,1912018,1910474,1909369,1909358,1909143,1908616,1908615,1908153,1908144,1907939,1907935,1907934,1907417,1879265,1879254,1465150,1462306,1462258,1462252,1462251,1458610,198874,1464228,195142,130435,1463382,199293,150781,109026,1453315,1907946,157086,1454924,true,33,188,280,71,351]
#7
⏱️ 12.27 мс
select * from "stores" where "stores"."id" in (33, 71, 280, 351)
#8
⏱️ 17.08 мс
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 = 1909143 THEN 1909143 WHEN sp.master_product_id = 198874 THEN 1909143 WHEN sp.master_product_id = 1907935 THEN 1907935 WHEN sp.master_product_id = 1464228 THEN 1907935 WHEN sp.master_product_id = 195142 THEN 1907935 WHEN sp.master_product_id = 130435 THEN 1465150 WHEN sp.master_product_id = 1465150 THEN 1465150 WHEN sp.master_product_id = 1879265 THEN 1879265 WHEN sp.master_product_id = 1463382 THEN 1879265 WHEN sp.master_product_id = 199293 THEN 1879265 WHEN sp.master_product_id = 150781 THEN 1879265 WHEN sp.master_product_id = 109026 THEN 1939916 WHEN sp.master_product_id = 1939916 THEN 1939916 WHEN sp.master_product_id = 1453315 THEN 1939916 WHEN sp.master_product_id = 1907946 THEN 1939916 WHEN sp.master_product_id = 157086 THEN 1939916 WHEN sp.master_product_id = 1454924 THEN 1462306 WHEN sp.master_product_id = 1462306 THEN 1462306 ELSE sp.master_product_id END limit 500
Bindings:
[2290837,1961904,1954257,1939916,1928902,1928253,1926121,1916627,1915867,1915186,1912226,1912018,1910474,1909369,1909358,1909143,1908616,1908615,1908153,1908144,1907939,1907935,1907934,1907417,1879265,1879254,1465150,1462306,1462258,1462252,1462251,1458610,198874,1464228,195142,130435,1463382,199293,150781,109026,1453315,1907946,157086,1454924,0,33,188,280,71,351]
#9
⏱️ 11.8 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5563257,6407917,5663724,5645746,5645747,5645751,5645770,5656074,5645931,5650507,5650508,5650512,5650747,5650757,5653255,5653256,5656308,5658419,5658430,5663694,5673193,5673401,5656304,5660834,5663571,5645733,5656323,5660836,5650439,5658417,5658726,5253178,5255799]
#10
⏱️ 15.33 мс
select * from "stores" where "stores"."id" in (33, 71, 280, 351)
#11
⏱️ 1.63 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"rosh-haayin"]
#12
⏱️ 29.47 мс
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:
[33,188,280,71,351,true,"2026-09-08T06:22:34.450145Z"]
#13
⏱️ 6.52 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rosh-haayin"]
#14
⏱️ 3.55 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 5.71 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]