#1
⏱️ 124.63 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 300.84 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?)) union (select "master_product_id" from "deals" where "is_active" = ? and "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",287,true,287,"produce"]
#3
⏱️ 228.81 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "master_products"."id" in ((select "master_product_id" from "store_prices" where "store_id" in (?)) union (select "master_product_id" from "deals" where "is_active" = ? and "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",287,true,287,"produce"]
#4
⏱️ 7.6 мс
select * from "canonical_products" where "canonical_products"."id" in (121, 222)
#5
⏱️ 2.68 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[121,222]
#6
⏱️ 6.61 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[1928902,1926121,1916627,1915867,1915305,1912369,1912286,1912226,1912088,1912087,1912018,1912003,1911972,1911613,1911330,1910474,1910399,1910197,1909949,1909908,1909873,1909866,1909865,1909474,1909369,1909358,1909289,1909168,1908616,1908615,1908153,1908144,164584,1456475,true,287]
#7
⏱️ 6.42 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 8.42 мс
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 = 1910399 THEN 1910399 WHEN sp.master_product_id = 164584 THEN 1910399 WHEN sp.master_product_id = 1909168 THEN 1909168 WHEN sp.master_product_id = 1456475 THEN 1909168 ELSE sp.master_product_id END limit 500
Bindings:
[1928902,1926121,1916627,1915867,1915305,1912369,1912286,1912226,1912088,1912087,1912018,1912003,1911972,1911613,1911330,1910474,1910399,1910197,1909949,1909908,1909873,1909866,1909865,1909474,1909369,1909358,1909289,1909168,1908616,1908615,1908153,1908144,164584,1456475,0,287]
#9
⏱️ 5.79 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5276567,5276575,5279078,5279079,5281600,5281720,5281802,5281806,5281909,5284298,5284299,5284306,5284344,5284379,5286615,5286831,5286918,5291796,5293783,5294092,5294118,5294132,5294195,5294196,5296354,5296411,5296503,5281664,5284167,5286806,5271676,5284169]
#10
⏱️ 5.7 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 5.41 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"katzrin"]
#12
⏱️ 10.74 мс
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-09-08T05:06:59.079888Z"]
#13
⏱️ 5.76 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#14
⏱️ 6.98 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 5.04 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]