#1
⏱️ 88.04 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"hadera"]
#2
⏱️ 547.13 мс
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",738,469,155,342,true,738,469,155,342]
#3
⏱️ 205.96 мс
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",738,469,155,342,true,738,469,155,342]
#4
⏱️ 5.75 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 0.73 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 8.4 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[8775798,8775778,5127697,3927220,2896439,2671000,2670972,2667237,2632389,1910802,692746,362443,281449,264842,242656,208252,208251,207716,197740,189941,189940,182438,182437,182094,180263,165452,165434,164977,164949,164690,164651,164650,3702666,true,738,469,155,342]
#7
⏱️ 2.36 мс
select * from "stores" where "stores"."id" in (342, 738)
#8
⏱️ 5.35 мс
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:
[8775798,8775778,5127697,3927220,2896439,2671000,2670972,2667237,2632389,1910802,692746,362443,281449,264842,242656,208252,208251,207716,197740,189941,189940,182438,182437,182094,180263,165452,165434,164977,164949,164690,164651,164650,3702666,0,738,469,155,342]
#9
⏱️ 10.74 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5432584,5439717,5432585,5432779,1844245,1837423,51486596,1837267,1834437,1832553,1832584,1841751,1840299,1833947,1833959,1836681,29231760,10355703,10355734,33006972,29231126,67502991,9611961,9603152,4024622,9604463,9613272]
#10
⏱️ 7.48 мс
select * from "stores" where "stores"."id" in (342, 469, 738)
#11
⏱️ 7.24 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["hadera"]
#12
⏱️ 1.54 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.77 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]