#1
⏱️ 27.12 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"krayot"]
#2
⏱️ 120.86 мс
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
⏱️ 119.09 мс
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
⏱️ 6.03 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 1.06 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 7.84 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775798,8775778,7576977,7518346,7443272,7443271,7443269,5127697,4809781,4523221,3990153,3989817,3253804,2671000,2670972,2667237,2641893,2632389,2028648,2018863,1985559,1915058,1911990,1910802,1909873,1909865,1456789,1456787,1456066,1456064,1456062,1454309,3702666,true,735,1188,1293,290,154,430,506,660,1397,99]
#7
⏱️ 1.62 мс
select * from "stores" where "stores"."id" in (290, 735)
#8
⏱️ 2.73 мс
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 = 3702666 THEN 2667237 WHEN sp.master_product_id = 2667237 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[8775798,8775778,7576977,7518346,7443272,7443271,7443269,5127697,4809781,4523221,3990153,3989817,3253804,2671000,2670972,2667237,2641893,2632389,2028648,2018863,1985559,1915058,1911990,1910802,1909873,1909865,1456789,1456787,1456066,1456064,1456062,1454309,3702666,0,735,1188,1293,290,154,430,506,660,1397,99]
#9
⏱️ 8.43 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5172446,56690951,5178404,5178405,5178720,5178722,5181594,5181602,5195966,29390685,29390719,29393466,2018125,2021780,2023645,10534514,29397546,12284102,2626089,12284580,30386222,47890928,2626115,2626117,2626118,78723802,2625715,9603149,4024619,9604460,9613269]
#10
⏱️ 1.27 мс
select * from "stores" where "stores"."id" in (290, 430, 506, 735)
#11
⏱️ 1.75 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["krayot"]
#12
⏱️ 1.03 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.35 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]