#1
⏱️ 139.03 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netivot"]
#2
⏱️ 373.04 мс
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","herbs_mushrooms",445,623,true,445,623,"produce"]
#3
⏱️ 125.07 мс
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","herbs_mushrooms",445,623,true,445,623,"produce"]
#4
⏱️ 23.77 мс
select * from "canonical_products" where "canonical_products"."id" in (87, 121, 140, 193, 257, 276, 279)
#5
⏱️ 6.36 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?)
Bindings:
[193,140,87,257,279,276,121]
#6
⏱️ 7.89 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[7529293,7493489,4991092,4987921,4987920,4987918,4987624,4987231,4985340,4983785,4983613,4658871,4658870,4658869,4658868,4602029,4601010,3887679,2752778,2710285,2671026,2670964,2666758,2666106,2664001,2641760,2633097,1910399,1456754,1454103,206346,205837,207015,195121,110668,164584,195120,110465,207016,112362,207014,195119,1467932,207013,195118,true,445,623]
#7
⏱️ 19.69 мс
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 = 207015 THEN 4658870 WHEN sp.master_product_id = 195121 THEN 4658870 WHEN sp.master_product_id = 110668 THEN 4658870 WHEN sp.master_product_id = 4658870 THEN 4658870 WHEN sp.master_product_id = 1910399 THEN 1910399 WHEN sp.master_product_id = 164584 THEN 1910399 WHEN sp.master_product_id = 195120 THEN 4658871 WHEN sp.master_product_id = 110465 THEN 4658871 WHEN sp.master_product_id = 207016 THEN 4658871 WHEN sp.master_product_id = 4658871 THEN 4658871 WHEN sp.master_product_id = 7529293 THEN 7529293 WHEN sp.master_product_id = 112362 THEN 7529293 WHEN sp.master_product_id = 4658869 THEN 4658869 WHEN sp.master_product_id = 207014 THEN 4658869 WHEN sp.master_product_id = 195119 THEN 4658869 WHEN sp.master_product_id = 1467932 THEN 4602029 WHEN sp.master_product_id = 4602029 THEN 4602029 WHEN sp.master_product_id = 4658868 THEN 4658868 WHEN sp.master_product_id = 207013 THEN 4658868 WHEN sp.master_product_id = 195118 THEN 4658868 ELSE sp.master_product_id END limit 500
Bindings:
[7529293,7493489,4991092,4987921,4987920,4987918,4987624,4987231,4985340,4983785,4983613,4658871,4658870,4658869,4658868,4602029,4601010,3887679,2752778,2710285,2671026,2670964,2666758,2666106,2664001,2641760,2633097,1910399,1456754,1454103,206346,205837,207015,195121,110668,164584,195120,110465,207016,112362,207014,195119,1467932,207013,195118,0,445,623]
#8
⏱️ 17.78 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[29595680,10955546,2215369,2213738,2219651,2221267,2221322,2210459,33370846,2212009,31236365,29590079,2218534,12354934,3010663,12362057,81035758,11739974,11737533,11738186,3010625,3011100,3011101,3009757,3009756,12363029,12350188,12353168,12357059,12357953,12358247,12358249,12358250,12350019]
#9
⏱️ 7.55 мс
select * from "stores" where "stores"."id" in (445, 623)
#10
⏱️ 5.51 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"netivot"]
#11
⏱️ 5.14 мс
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-10-22T19:14:32.370598Z"]
#12
⏱️ 6.83 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netivot"]
#13
⏱️ 7.32 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#14
⏱️ 14.07 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]