#1
⏱️ 47.78 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rosh-haayin"]
#2
⏱️ 609.81 мс
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:
["grocery",33,71,188,280,351,true,33,71,188,280,351]
#3
⏱️ 551.77 мс
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:
["grocery",33,71,188,280,351,true,33,71,188,280,351]
#4
⏱️ 1.84 мс
select * from "canonical_products" where "canonical_products"."id" in (242)
#5
⏱️ 0.63 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[242]
#6
⏱️ 6.09 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[30691571,25603232,8776026,4536333,4533815,2037598,1954840,1921957,1918295,1915186,1915185,1913217,1913216,1912286,1912018,1911972,1910474,1910364,1910363,1909890,1909369,1909366,1909358,1908616,1908615,1908313,1908290,1908153,1908144,1907830,1546573,1507326,4227275,true,33,71,188,280,351]
#7
⏱️ 1.22 мс
select * from "stores" where "stores"."id" in (33, 71, 188, 280)
#8
⏱️ 2.65 мс
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 ELSE sp.master_product_id END limit 500
Bindings:
[30691571,25603232,8776026,4536333,4533815,2037598,1954840,1921957,1918295,1915186,1915185,1913217,1913216,1912286,1912018,1911972,1910474,1910364,1910363,1909890,1909369,1909366,1909358,1908616,1908615,1908313,1908290,1908153,1908144,1907830,1546573,1507326,4227275,0,33,71,188,280,351]
#9
⏱️ 9.88 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5595471,67324976,6507435,6417878,67395692,5648377,5650747,5650757,5650903,5650921,5653255,5653256,5658419,5658427,5658430,5660997,5663553,5663554,5663694,11887398,5673193,5673460,5645771,5645772,5656303,5656304,5671494,5660972,85127699]
#10
⏱️ 2.89 мс
select * from "stores" where "stores"."id" in (33, 71, 280)
#11
⏱️ 1.9 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rosh-haayin"]
#12
⏱️ 1.3 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.66 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]