#1
⏱️ 162.43 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netivot"]
#2
⏱️ 332.03 мс
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",445,623,true,445,623,"produce"]
#3
⏱️ 223.32 мс
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",445,623,true,445,623,"produce"]
#4
⏱️ 14.57 мс
select * from "canonical_products" where "canonical_products"."id" in (12, 78, 126, 252, 264, 320)
#5
⏱️ 6.72 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[126,320,12,78,252,264]
#6
⏱️ 14.41 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[4599809,4546420,4546409,4546240,4546223,3411661,2974530,2748827,2715904,2680174,2671353,2671011,2670946,2668399,2666106,2662799,2662570,2662130,2647242,2637097,2634735,2633336,2632033,2631970,1911330,1515272,1458529,1458528,1458526,1457611,1457103,1421419,2956794,1453321,156941,158420,192681,150751,1452766,133528,1879659,98914,192680,true,445,623]
#7
⏱️ 36.39 мс
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 = 2956794 THEN 3411661 WHEN sp.master_product_id = 3411661 THEN 3411661 WHEN sp.master_product_id = 1453321 THEN 2647242 WHEN sp.master_product_id = 2647242 THEN 2647242 WHEN sp.master_product_id = 156941 THEN 2647242 WHEN sp.master_product_id = 158420 THEN 2647242 WHEN sp.master_product_id = 4546409 THEN 4546409 WHEN sp.master_product_id = 192681 THEN 4546409 WHEN sp.master_product_id = 150751 THEN 2637097 WHEN sp.master_product_id = 1452766 THEN 2637097 WHEN sp.master_product_id = 133528 THEN 2637097 WHEN sp.master_product_id = 1879659 THEN 2637097 WHEN sp.master_product_id = 2637097 THEN 2637097 WHEN sp.master_product_id = 1458529 THEN 1458529 WHEN sp.master_product_id = 98914 THEN 1458529 WHEN sp.master_product_id = 4546240 THEN 4546240 WHEN sp.master_product_id = 192680 THEN 4546240 ELSE sp.master_product_id END limit 500
Bindings:
[4599809,4546420,4546409,4546240,4546223,3411661,2974530,2748827,2715904,2680174,2671353,2671011,2670946,2668399,2666106,2662799,2662570,2662130,2647242,2637097,2634735,2633336,2632033,2631970,1911330,1515272,1458529,1458528,1458526,1457611,1457103,1421419,2956794,1453321,156941,158420,192681,150751,1452766,133528,1879659,98914,192680,0,445,623]
#8
⏱️ 18.15 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2216750,2215563,2213081,2221982,2222341,2215000,2216728,2213782,2218133,2218152,2210288,2218121,2218161,2212818,2213068,2213275,2213738,2218172,2220411,2221309,2211037,2210873,2210175,2211310,2221343,2210491,3011795,3011223,3014842,3014853,3014889,3014891,3008953]
#9
⏱️ 10.11 мс
select * from "stores" where "stores"."id" in (445, 623)
#10
⏱️ 7.83 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"netivot"]
#11
⏱️ 12.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:
[445,623,true,"2026-09-08T07:07:23.209522Z"]
#12
⏱️ 10.85 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netivot"]
#13
⏱️ 17.44 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#14
⏱️ 14.26 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]