#1
⏱️ 212.92 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"safed"]
#2
⏱️ 1238.14 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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 (?, ?)))
Bindings:
["snacks",101,275,true,101,275]
#3
⏱️ 660.83 мс
select * from "master_products" where "barcode" is not null and "category_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 (?, ?))) 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:
["snacks",101,275,true,101,275]
#4
⏱️ 14.24 мс
select * from "canonical_products" where "canonical_products"."id" in (344)
#5
⏱️ 14.52 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[344]
#6
⏱️ 26.89 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[108787969,2025719,1962021,1955549,1942767,1922599,1921228,1911990,1910510,1910304,1910197,1909873,1909866,1909865,1909719,1567603,1461586,1461585,1461584,1461407,1461406,1461236,1461089,1461088,1458363,1458346,1458275,1458272,1458241,1458209,1457763,1457103,1461403,true,101,275]
#7
⏱️ 18.04 мс
select * from "stores" where "stores"."id" in (101, 275)
#8
⏱️ 18.76 мс
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 = 1461403 THEN 1461407 WHEN sp.master_product_id = 1461407 THEN 1461407 ELSE sp.master_product_id END limit 500
Bindings:
[108787969,2025719,1962021,1955549,1942767,1922599,1921228,1911990,1910510,1910304,1910197,1909873,1909866,1909865,1909719,1567603,1461586,1461585,1461584,1461407,1461406,1461236,1461089,1461088,1458363,1458346,1458275,1458272,1458241,1458209,1457763,1457103,1461403,0,101,275]
#9
⏱️ 13.81 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[114532833,5386234,5388223,5390020,5390039,5390069,5390072,25765957,5390155,5402669,5402717,5402718,5402859,5402860,5402861,5392628,5387972,5388116,5388117,5388124,5389988,5390142,5390376,5400046,5381538,5388224,27038631,5390277,5387973,95084448]
#10
⏱️ 7.76 мс
select * from "stores" where "stores"."id" in (101, 275)
#11
⏱️ 10.53 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["safed"]
#12
⏱️ 8.47 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.4 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]