#1
⏱️ 64.67 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"maale-adumim"]
#2
⏱️ 229.9 мс
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",262,1265,128,true,262,1265,128,"produce"]
#3
⏱️ 54.75 мс
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",262,1265,128,true,262,1265,128,"produce"]
#4
⏱️ 1.41 мс
select * from "canonical_products" where "canonical_products"."id" in (82, 185, 266)
#5
⏱️ 0.74 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?)
Bindings:
[266,82,185]
#6
⏱️ 18.95 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[1879254,959071,925036,925028,499851,496502,483766,438378,438372,409780,409469,365009,365008,364409,364407,364406,364405,364403,362427,313618,248289,246693,242432,156536,133053,131805,127404,115802,115801,114067,113742,113741,109243,134681,150736,190899,100365,97295,364246,true,262,1265,128]
#7
⏱️ 1.88 мс
select * from "stores" where "stores"."id" in (128, 262)
#8
⏱️ 18.29 мс
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 = 109243 THEN 496502 WHEN sp.master_product_id = 496502 THEN 496502 WHEN sp.master_product_id = 134681 THEN 496502 WHEN sp.master_product_id = 150736 THEN 496502 WHEN sp.master_product_id = 190899 THEN 496502 WHEN sp.master_product_id = 364403 THEN 364403 WHEN sp.master_product_id = 100365 THEN 364403 WHEN sp.master_product_id = 97295 THEN 364403 WHEN sp.master_product_id = 364246 THEN 959071 WHEN sp.master_product_id = 959071 THEN 959071 ELSE sp.master_product_id END limit 500
Bindings:
[1879254,959071,925036,925028,499851,496502,483766,438378,438372,409780,409469,365009,365008,364409,364407,364406,364405,364403,362427,313618,248289,246693,242432,156536,133053,131805,127404,115802,115801,114067,113742,113741,109243,134681,150736,190899,100365,97295,364246,0,262,1265,128]
#9
⏱️ 16.24 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6186887,6177999,6188471,6193316,6187013,6182547,6178050,6184159,6180852,6184294,6187070,6187071,6187072,6187074,6188820,6188821,6187082,6188486,6191598,6191603,6196030,6191608,6191614,6186892,6178038,953119,953120,5003206,954227,955268,953167,955444,954781,955244,955245,955246,955647,955442,953163,957278]
#10
⏱️ 2.42 мс
select * from "stores" where "stores"."id" in (128, 262)
#11
⏱️ 3.23 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"maale-adumim"]
#12
⏱️ 120.56 мс
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:
[1265,128,true,"2026-10-22T23:12:16.381140Z"]
#13
⏱️ 5.75 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["maale-adumim"]
#14
⏱️ 8.53 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 3.32 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]