#1
⏱️ 99.38 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beit-shemesh"]
#2
⏱️ 601.89 мс
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 (?, ?, ?, ?)))
Bindings:
["snacks","chocolate_candy",742,273,479,24,true,742,273,479,24]
#3
⏱️ 288.8 мс
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 (?, ?, ?, ?))) 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","chocolate_candy",742,273,479,24,true,742,273,479,24]
#4
⏱️ 5.84 мс
select * from "canonical_products" where "canonical_products"."id" in (344)
#5
⏱️ 5.26 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[344]
#6
⏱️ 22.16 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[26461181,8775717,7473573,7473572,7473383,7469960,7468703,7468425,7463409,7463375,7463364,7455625,7452634,7442100,4987566,4985151,3639142,2871877,2847887,2701356,2648342,2616260,2609003,2047938,1910304,1909866,1467822,1467821,1461407,1461406,1461088,1461069,1461403,true,742,273,479,24]
#7
⏱️ 6.74 мс
select * from "stores" where "stores"."id" in (273, 742)
#8
⏱️ 14.12 мс
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:
[26461181,8775717,7473573,7473572,7473383,7469960,7468703,7468425,7463409,7463375,7463364,7455625,7452634,7442100,4987566,4985151,3639142,2871877,2847887,2701356,2648342,2616260,2609003,2047938,1910304,1909866,1467822,1467821,1461407,1461406,1461088,1461069,1461403,0,742,273,479,24]
#9
⏱️ 21.4 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5773091,5773196,5773197,5763718,5763719,5761313,5763698,2520190,2521140,2517723,31668037,2518705,31666798,31667765,78529009,2517309,2522223,2522233,78529015,2517163,2517441,2518698,2522121,2522310,2522311,78529185,9569921,9559548,9592714,9592783,9571646]
#10
⏱️ 8.6 мс
select * from "stores" where "stores"."id" in (273, 479, 742)
#11
⏱️ 6.92 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beit-shemesh"]
#12
⏱️ 6.34 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 5.23 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]