#1
⏱️ 34.79 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rosh-haayin"]
#2
⏱️ 157.4 мс
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:
["grocery","canned_preserves",33,71,188,280,351,true,33,71,188,280,351]
#3
⏱️ 72.85 мс
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:
["grocery","canned_preserves",33,71,188,280,351,true,33,71,188,280,351]
#4
⏱️ 2.07 мс
select * from "canonical_products" where "canonical_products"."id" in (242, 337)
#5
⏱️ 0.9 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[242,337]
#6
⏱️ 11.3 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[4536333,1954840,1915186,1915185,1912286,1912018,1911972,1910474,1909369,1909366,1908153,1908144,1463675,1462258,1462252,1462251,1462250,1462249,1462248,1458610,1455752,1454194,1453961,1453960,1452294,1452066,1451765,1434518,1425655,615729,506053,349469,4227275,98614,true,33,71,188,280,351]
#7
⏱️ 1.31 мс
select * from "stores" where "stores"."id" in (33, 71, 280, 351)
#8
⏱️ 2.59 мс
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 = 1915185 THEN 1915185 WHEN sp.master_product_id = 4227275 THEN 1915185 WHEN sp.master_product_id = 98614 THEN 349469 WHEN sp.master_product_id = 349469 THEN 349469 ELSE sp.master_product_id END limit 500
Bindings:
[4536333,1954840,1915186,1915185,1912286,1912018,1911972,1910474,1909369,1909366,1908153,1908144,1463675,1462258,1462252,1462251,1462250,1462249,1462248,1458610,1455752,1454194,1453961,1453960,1452294,1452066,1451765,1434518,1425655,615729,506053,349469,4227275,98614,0,33,71,188,280,351]
#9
⏱️ 7.39 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5580797,45732876,67324977,67324976,6412960,67395693,67395692,5645561,5645754,5650746,5650750,5650900,5656251,5663724,5645744,5645745,5645746,5645747,5645751,5650638,5650747,5650757,5658427,5658430,5663694,11887398,5673193,5673460,5656303,5656304,5660972,766448,764561,5258096]
#10
⏱️ 1.55 мс
select * from "stores" where "stores"."id" in (33, 71, 280, 351)
#11
⏱️ 1.48 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rosh-haayin"]
#12
⏱️ 1.48 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.37 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]