#1
⏱️ 63.92 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"hadera"]
#2
⏱️ 1832.79 мс
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
⏱️ 390.45 мс
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
⏱️ 3.25 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 1.25 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 2.73 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[74076446,72978997,8775798,8775778,8775717,8775540,5127697,4985151,4432652,3927220,3639142,2959544,2896439,2872725,2871877,2847887,2801360,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2647546,2642570,2641936,2632516,2632389,2631106,3702666,true,738,469,155,342]
#7
⏱️ 1.34 мс
select * from "stores" where "stores"."id" in (738)
#8
⏱️ 3.01 мс
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:
[74076446,72978997,8775798,8775778,8775717,8775540,5127697,4985151,4432652,3927220,3639142,2959544,2896439,2872725,2871877,2847887,2801360,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2647546,2642570,2641936,2632516,2632389,2631106,3702666,0,738,469,155,342]
#9
⏱️ 2.39 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1833834,29231760,10346716,1838975,10348399,1835150,10351886,10343495,29224436,1843376,10355703,10355734,33006972,1834832,1838976,1842842,10348245,1840689,29231126,1836260,67502991,67505805,55850208,9592641,9592710,9603658,9592779,4024622,9560602,9571642,9604463,9613272]
#10
⏱️ 1.54 мс
select * from "stores" where "stores"."id" in (469, 738)
#11
⏱️ 2.07 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["hadera"]
#12
⏱️ 1.71 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.89 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]