#1
⏱️ 85.09 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"krayot"]
#2
⏱️ 1570.44 мс
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","chips_savory",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#3
⏱️ 367.75 мс
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","chips_savory",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#4
⏱️ 11.52 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 11.35 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 14.62 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[108808721,108787969,8775798,8775778,7576977,7568237,7518346,7472064,7443272,7443271,7443269,5127697,4809781,4523221,3990153,3989817,3927220,3253804,2671000,2670972,2667237,2641893,2632389,2028648,2018863,1985559,1915058,1911990,1910802,1909873,1909865,1567603,3702666,true,735,1188,1293,290,154,430,506,660,1397,99]
#7
⏱️ 4.42 мс
select * from "stores" where "stores"."id" in (99, 290, 735)
#8
⏱️ 12.83 мс
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 = 2667237 THEN 2667237 WHEN sp.master_product_id = 3702666 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[108808721,108787969,8775798,8775778,7576977,7568237,7518346,7472064,7443272,7443271,7443269,5127697,4809781,4523221,3990153,3989817,3927220,3253804,2671000,2670972,2667237,2641893,2632389,2028648,2018863,1985559,1915058,1911990,1910802,1909873,1909865,1567603,3702666,0,735,1188,1293,290,154,430,506,660,1397,99]
#9
⏱️ 23.81 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[113325231,5181594,5181602,5195966,85127548,85977628,29390685,29390719,29393466,2018125,2021780,2023645,10534514,29397546,88799626,79277298,77648395,2625839,90866446,12284102,2626089,12284580,30386222,47890928,2626115,2626117,2626118,104427502,78723802,104430570,2625715,78716151,78716153,9603149,4024619,9604460,9613269]
#10
⏱️ 5.72 мс
select * from "stores" where "stores"."id" in (99, 290, 430, 506, 735)
#11
⏱️ 5.33 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["krayot"]
#12
⏱️ 6.36 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 6.04 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]