#1
⏱️ 102.11 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#2
⏱️ 383.57 мс
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",125,452,true,125,452]
#3
⏱️ 197.97 мс
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",125,452,true,125,452]
#4
⏱️ 13.02 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 8.19 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 19.85 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[3605772,2896439,2671000,2670972,2667237,1910802,281449,264842,242656,208252,208251,207716,197740,182094,165452,165434,164977,164690,161499,159309,149801,135454,135452,135003,134463,133923,133587,132666,132500,132361,131921,131589,3702666,true,125,452]
#7
⏱️ 6.79 мс
select * from "stores" where "stores"."id" in (125)
#8
⏱️ 14.15 мс
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:
[3605772,2896439,2671000,2670972,2667237,1910802,281449,264842,242656,208252,208251,207716,197740,182094,165452,165434,164977,164690,161499,159309,149801,135454,135452,135003,134463,133923,133587,132666,132500,132361,131921,131589,3702666,0,125,452]
#9
⏱️ 39.16 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6261249,69580918,6247207,6256209,6257901,6264321,6257902,2300829,11206684,11211379,2297276,2295630,2296053,11214272,2299747,2297733,11235775,2301025,11199408,29761053,29766256,29767330,11220222,11208294,2296037,11232388,2294610,11212458,82700828,11206793,11219246,31333792,29752486,31327222]
#10
⏱️ 10.78 мс
select * from "stores" where "stores"."id" in (125, 452)
#11
⏱️ 12.67 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-shmona"]
#12
⏱️ 7.46 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.99 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]