#1
⏱️ 141.37 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"yavne"]
#2
⏱️ 331.28 мс
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",17,82,161,667,true,17,82,161,667,"produce"]
#3
⏱️ 223.95 мс
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",17,82,161,667,true,17,82,161,667,"produce"]
#4
⏱️ 10.83 мс
select * from "canonical_products" where "canonical_products"."id" in (2, 41, 131, 179, 209, 225, 231, 289, 355)
#5
⏱️ 5.17 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[231,131,2,179,209,355,41,289,225]
#6
⏱️ 60.78 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[2045870,1912286,1911972,1910197,1909873,1909866,1909474,1907954,1907953,1907951,1907942,1907931,1907928,1907926,1907923,1907901,1462893,1461585,1461069,1461068,1461067,1460960,1457611,1455999,1455963,1455743,1455711,1455697,1454960,1453441,1452394,1452343,1453431,110100,1431171,170225,190786,135652,190891,96276,133484,96274,199451,1431173,109470,133481,96300,133478,150752,109601,191005,1431175,100585,97793,150753,109477,135651,133477,190931,96273,1426746,8918271,true,17,82,161,667]
#7
⏱️ 3.03 мс
select * from "stores" where "stores"."id" in (17, 82)
#8
⏱️ 13.08 мс
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 = 1907942 THEN 1907942 WHEN sp.master_product_id = 1453431 THEN 1907942 WHEN sp.master_product_id = 110100 THEN 1907901 WHEN sp.master_product_id = 1431171 THEN 1907901 WHEN sp.master_product_id = 170225 THEN 1907901 WHEN sp.master_product_id = 1907901 THEN 1907901 WHEN sp.master_product_id = 190786 THEN 1907901 WHEN sp.master_product_id = 135652 THEN 1907901 WHEN sp.master_product_id = 1907953 THEN 1907953 WHEN sp.master_product_id = 190891 THEN 1907953 WHEN sp.master_product_id = 96276 THEN 1907953 WHEN sp.master_product_id = 133484 THEN 1907953 WHEN sp.master_product_id = 96274 THEN 1907931 WHEN sp.master_product_id = 199451 THEN 1907931 WHEN sp.master_product_id = 1907931 THEN 1907931 WHEN sp.master_product_id = 1431173 THEN 1907931 WHEN sp.master_product_id = 109470 THEN 1907931 WHEN sp.master_product_id = 133481 THEN 1907931 WHEN sp.master_product_id = 96300 THEN 1907926 WHEN sp.master_product_id = 133478 THEN 1907926 WHEN sp.master_product_id = 150752 THEN 1907926 WHEN sp.master_product_id = 109601 THEN 1907926 WHEN sp.master_product_id = 191005 THEN 1907926 WHEN sp.master_product_id = 1431175 THEN 1907926 WHEN sp.master_product_id = 1907926 THEN 1907926 WHEN sp.master_product_id = 100585 THEN 1455697 WHEN sp.master_product_id = 97793 THEN 1455697 WHEN sp.master_product_id = 1455697 THEN 1455697 WHEN sp.master_product_id = 150753 THEN 1907954 WHEN sp.master_product_id = 109477 THEN 1907954 WHEN sp.master_product_id = 135651 THEN 1907954 WHEN sp.master_product_id = 133477 THEN 1907954 WHEN sp.master_product_id = 190931 THEN 1907954 WHEN sp.master_product_id = 1907954 THEN 1907954 WHEN sp.master_product_id = 96273 THEN 1907954 WHEN sp.master_product_id = 1426746 THEN 1455711 WHEN sp.master_product_id = 1455711 THEN 1455711 WHEN sp.master_product_id = 8918271 THEN 1907923 WHEN sp.master_product_id = 1907923 THEN 1907923 ELSE sp.master_product_id END limit 500
Bindings:
[2045870,1912286,1911972,1910197,1909873,1909866,1909474,1907954,1907953,1907951,1907942,1907931,1907928,1907926,1907923,1907901,1462893,1461585,1461069,1461068,1461067,1460960,1457611,1455999,1455963,1455743,1455711,1455697,1454960,1453441,1452394,1452343,1453431,110100,1431171,170225,190786,135652,190891,96276,133484,96274,199451,1431173,109470,133481,96300,133478,150752,109601,191005,1431175,100585,97793,150753,109477,135651,133477,190931,96273,1426746,8918271,0,17,82,161,667]
#9
⏱️ 17.83 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6098337,6093350,6093326,6093330,6093325,6093327,4837352,4837365,4840043,4840423,4843113,4843134,4843173,4843191,4846203,4852929,4852947,4852948,4852949,4853075,4837492,4840037,4840053,4840055,4840057,4840059,4840069,4840076,4840078,4840079,4843336,4846219,4846227,4846526,4851857,4852145]
#10
⏱️ 5.34 мс
select * from "stores" where "stores"."id" in (17, 82)
#11
⏱️ 1.45 мс
select * from "stores" where "is_active" = ? and "latitude" is not null and "longitude" is not null and "city_slug" = ?
Bindings:
[true,"yavne"]
#12
⏱️ 25.77 мс
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:
[17,82,161,667,true,"2026-09-08T05:45:55.809836Z"]
#13
⏱️ 6.38 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["yavne"]
#14
⏱️ 11.42 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#15
⏱️ 7.21 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]