#1
⏱️ 54.66 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"zikhron-yaakov"]
#2
⏱️ 176.28 мс
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",443,616,435,347,true,443,616,435,347]
#3
⏱️ 154.6 мс
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",443,616,435,347,true,443,616,435,347]
#4
⏱️ 8.05 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 4.66 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 8.69 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[4990833,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4608224,4546366,4546223,4536177,4523221,3927220,3854695,3556383,3395115,3253804,2896439,2671000,2670972,2667237,2632389,3702666,true,443,616,435,347]
#7
⏱️ 13.14 мс
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:
[4990833,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4608224,4546366,4546223,4536177,4523221,3927220,3854695,3556383,3395115,3253804,2896439,2671000,2670972,2667237,2632389,3702666,0,443,616,435,347]
#8
⏱️ 27.67 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[10663786,10663837,57115044,2095775,10661135,2095944,1826630,29216586,29218896,29212340,1823233,29219344,7957793,2890753,3210004,2890752,12176170,12196039,12196180,12174194,3208223,3208329,3208464,3208581,3208592,3209058,3209250,3210342,3210794,3210935,3211255,3213340,3213392,3215095,3215287,3215344,3215405]
#9
⏱️ 8.79 мс
select * from "stores" where "stores"."id" in (435, 443, 616)
#10
⏱️ 7.62 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["zikhron-yaakov"]
#11
⏱️ 13.05 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 4.11 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]