#1
⏱️ 115.14 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 821.17 мс
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",287,true,287,"produce"]
#3
⏱️ 183.76 мс
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",287,true,287,"produce"]
#4
⏱️ 6.85 мс
select * from "canonical_products" where "canonical_products"."id" in (20, 104, 183)
#5
⏱️ 6.75 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?)
Bindings:
[20,183,104]
#6
⏱️ 15.05 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[1928902,1926121,1916175,1915867,1912226,1911874,1910173,1910051,1907939,1907935,1907934,1907928,1907417,1464670,1464669,1458545,1458424,1455921,1455917,1455914,1455913,1455912,1455911,1455910,1455896,1455666,1455665,1455663,1455662,1455661,1455659,1454934,1464228,195142,1454905,1454238,true,287]
#7
⏱️ 7.3 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 16.73 мс
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 = 1464228 THEN 1907935 WHEN sp.master_product_id = 195142 THEN 1907935 WHEN sp.master_product_id = 1907935 THEN 1907935 WHEN sp.master_product_id = 1454934 THEN 1454934 WHEN sp.master_product_id = 1454905 THEN 1454934 WHEN sp.master_product_id = 1455921 THEN 1455921 WHEN sp.master_product_id = 1454238 THEN 1455921 ELSE sp.master_product_id END limit 500
Bindings:
[1928902,1926121,1916175,1915867,1912226,1911874,1910173,1910051,1907939,1907935,1907934,1907928,1907417,1464670,1464669,1458545,1458424,1455921,1455917,1455914,1455913,1455912,1455911,1455910,1455896,1455666,1455665,1455663,1455662,1455661,1455659,1454934,1464228,195142,1454905,1454238,0,287]
#9
⏱️ 20.51 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5279148,5279463,5279465,5279466,5279468,5279470,5279471,5281573,5281580,5281581,5281582,5281583,5281584,5281585,5281587,5286795,5286888,5279132,5279133,5271877,5274381,5274386,5274387,5274391,5284476,5286599,5294016,5296354,5284167,5271676,5284169]
#10
⏱️ 2.99 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 2.88 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"katzrin"]
#12
⏱️ 80.2 мс
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:
[287,true,"2026-10-22T22:09:29.396345Z"]
#13
⏱️ 6.13 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#14
⏱️ 3.49 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 6.51 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]