#1
⏱️ 113.44 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"safed"]
#2
⏱️ 969.16 мс
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
⏱️ 238.59 мс
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
⏱️ 4.84 мс
select * from "canonical_products" where "canonical_products"."id" in (344)
#5
⏱️ 4.74 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[344]
#6
⏱️ 15.54 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[1962021,1955549,1942767,1922599,1921228,1911990,1910510,1910304,1910197,1909873,1909866,1909865,1909719,1461586,1461585,1461584,1461407,1461406,1461236,1461089,1461088,1458363,1458346,1458275,1458272,1458241,1458209,1457763,1457103,1456789,1456787,1456785,1461403,true,101,275]
#7
⏱️ 4.38 мс
select * from "stores" where "stores"."id" in (275)
#8
⏱️ 10.53 мс
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:
[1962021,1955549,1942767,1922599,1921228,1911990,1910510,1910304,1910197,1909873,1909866,1909865,1909719,1461586,1461585,1461584,1461407,1461406,1461236,1461089,1461088,1458363,1458346,1458275,1458272,1458241,1458209,1457763,1457103,1456789,1456787,1456785,1461403,0,101,275]
#9
⏱️ 9.53 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5386095,5386100,5386102,5386234,5388223,5390020,5390039,5390069,5390072,25765957,5390155,5402669,5402717,5402718,5402859,5402860,5402861,5387972,5388116,5388117,5388124,5389988,5390142,5390376,5400046,5381538,5388224,27038631,5390277,5387973]
#10
⏱️ 9.88 мс
select * from "stores" where "stores"."id" in (275)
#11
⏱️ 7.49 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["safed"]
#12
⏱️ 6.49 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.01 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]