#1
⏱️ 80.94 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rosh-haayin"]
#2
⏱️ 1901.45 мс
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","sauces_oils",33,71,188,280,351,true,33,71,188,280,351]
#3
⏱️ 787.72 мс
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","sauces_oils",33,71,188,280,351,true,33,71,188,280,351]
#4
⏱️ 6.86 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 9.48 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 44.99 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[30691571,25603232,2037598,1918295,1913217,1913216,1908313,1908290,1546573,1507326,1486122,1476182,1475502,1463665,1462617,1458529,1458528,1458526,1456529,1452337,1452327,1438422,1435632,1427933,1421477,1420072,1419949,1419457,1419377,1419349,1310512,1170555,98914,true,33,71,188,280,351]
#7
⏱️ 8.57 мс
select * from "stores" where "stores"."id" in (33, 71, 188, 280, 351)
#8
⏱️ 15.56 мс
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 = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[30691571,25603232,2037598,1918295,1913217,1913216,1908313,1908290,1546573,1507326,1486122,1476182,1475502,1463665,1462617,1458529,1458528,1458526,1456529,1452337,1452327,1438422,1435632,1427933,1421477,1420072,1419949,1419457,1419377,1419349,1310512,1170555,98914,0,33,71,188,280,351]
#9
⏱️ 21.46 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5583081,6413261,4576839,4579614,4573596,4573610,4573657,4573821,4573917,4579610,4582334,4576711,4584450,4573866,4576757,14473668,5658448,5663647,5663649,5663650,5645874,5650627,5650903,5650921,5645771,5645772,5671494,85127699,766718]
#10
⏱️ 1.99 мс
select * from "stores" where "stores"."id" in (33, 71, 188, 280, 351)
#11
⏱️ 5.66 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rosh-haayin"]
#12
⏱️ 13.21 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 7.39 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]