#1
⏱️ 163.92 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#2
⏱️ 324.05 мс
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",125,452,true,125,452,"produce"]
#3
⏱️ 159.97 мс
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",125,452,true,125,452,"produce"]
#4
⏱️ 6.71 мс
select * from "canonical_products" where "canonical_products"."id" in (321, 330)
#5
⏱️ 3.54 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[330,321]
#6
⏱️ 18.02 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[7252747,2632033,2631970,2151263,2045870,1455203,1453435,598059,497990,327734,327732,311485,253681,177699,165867,135622,134159,134109,133579,133578,133570,133557,133555,133545,133533,133530,133508,133499,133475,133345,132045,131655,109654,109659,true,125,452]
#7
⏱️ 11.46 мс
select * from "stores" where "stores"."id" in (125)
#8
⏱️ 15.59 мс
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 = 133530 THEN 133530 WHEN sp.master_product_id = 109654 THEN 133530 WHEN sp.master_product_id = 109659 THEN 133545 WHEN sp.master_product_id = 133545 THEN 133545 ELSE sp.master_product_id END limit 500
Bindings:
[7252747,2632033,2631970,2151263,2045870,1455203,1453435,598059,497990,327734,327732,311485,253681,177699,165867,135622,134159,134109,133579,133578,133570,133557,133555,133545,133533,133530,133508,133499,133475,133345,132045,131655,109654,109659,0,125,452]
#9
⏱️ 8.8 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6252536,6257795,6250872,6250885,2298209,2299481,2298556,2298405,2298441,2298450,2298471,2298475,2298493,2298512,2298527,2298550,2298564,2298575,2299377,2300976,2297750,2294966,2298587,2298485,2298524,2301485]
#10
⏱️ 6.48 мс
select * from "stores" where "stores"."id" in (125, 452)
#11
⏱️ 7.24 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#12
⏱️ 30.03 мс
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:
[125,452,true,"2026-09-08T05:45:42.737461Z"]
#13
⏱️ 5.4 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-shmona"]
#14
⏱️ 9.34 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 15.9 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]