#1
⏱️ 138.31 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"tiberias"]
#2
⏱️ 419.3 мс
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",756,633,true,756,633]
#3
⏱️ 177.47 мс
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",756,633,true,756,633]
#4
⏱️ 6.87 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 5.14 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 4.93 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[108808721,108787969,4990833,4990832,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984783,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4809781,4546366,4546223,3854695,3556383,2896439,2671000,2670972,2667237,2632389,1910802,3702666,true,756,633]
#7
⏱️ 7.4 мс
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,4990833,4990832,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984783,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4809781,4546366,4546223,3854695,3556383,2896439,2671000,2670972,2667237,2632389,1910802,3702666,0,756,633]
#8
⏱️ 12.33 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[86695669,12282907,12276957,2966065,2966202,2956114,12273676,12273782,12273917,12274034,12274045,12275011,12275703,12275808,12277895,12278347,12278488,12279308,12283394,12283446,12287149,12287842,12287899,12287959,12287960,80959306,85775512,10318513,1817010,1817042,1817071,1814546,71231553,71231555]
#9
⏱️ 9.87 мс
select * from "stores" where "stores"."id" in (633, 756)
#10
⏱️ 6.66 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["tiberias"]
#11
⏱️ 3.04 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 5.7 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]