#1
⏱️ 239.57 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"hadera"]
#2
⏱️ 1799.44 мс
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",738,469,155,342,true,738,469,155,342]
#3
⏱️ 1412.76 мс
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",738,469,155,342,true,738,469,155,342]
#4
⏱️ 24.93 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 19.82 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 27.56 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[108808721,108787969,74076446,72978997,8775798,8775778,8775717,8775540,5127697,4985151,4432652,4099032,3927220,3639142,3173989,2959544,2896439,2872725,2871877,2847887,2801360,2742017,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2648342,3702666,true,738,469,155,342]
#7
⏱️ 11.14 мс
select * from "stores" where "stores"."id" in (342, 738)
#8
⏱️ 18.19 мс
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,74076446,72978997,8775798,8775778,8775717,8775540,5127697,4985151,4432652,4099032,3927220,3639142,3173989,2959544,2896439,2872725,2871877,2847887,2801360,2742017,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2648342,3702666,0,738,469,155,342]
#9
⏱️ 67.51 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[111824579,88641401,10351886,10343495,29224436,1843376,10355703,10355734,33006972,1834832,1838976,88629509,1842842,10348245,1840689,29231126,1836260,110395422,67502991,67505805,55850208,71254956,79112170,9592641,9592710,9603658,9592779,4024622,9560602,9571642,9604463,9613272]
#10
⏱️ 11.62 мс
select * from "stores" where "stores"."id" in (342, 469, 738)
#11
⏱️ 15.16 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["hadera"]
#12
⏱️ 14.99 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 22.2 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]