#1
⏱️ 147.64 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netivot"]
#2
⏱️ 1205.78 мс
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",445,623,true,445,623]
#3
⏱️ 183.91 мс
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",445,623,true,445,623]
#4
⏱️ 21.26 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 11.38 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 12.64 мс
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,4546223,3854695,3646080,3556383,2750558,2742017,2671000,2670972,2667237,1453214,362443,209586,208252,208251,207717,3702666,true,445,623]
#7
⏱️ 19.95 мс
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,4546223,3854695,3646080,3556383,2750558,2742017,2671000,2670972,2667237,1453214,362443,209586,208252,208251,207717,3702666,0,445,623]
#8
⏱️ 35.09 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[10946465,2209971,2220214,2221275,31245823,10939277,29594180,77908614,3011690,3012169,11744480,3013266,12359500,12351237,12359848,12353260,3014842,12350054,12350160,12350295,12350412,12350423,12351314,12352006,12354098,12355050,12355191,12356011,12360597,12360649,12362459,12362651,12362708,12362769]
#9
⏱️ 18.22 мс
select * from "stores" where "stores"."id" in (445, 623)
#10
⏱️ 12.72 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netivot"]
#11
⏱️ 16.58 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 14.04 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]