#1
⏱️ 195.41 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 4493.97 мс
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:
["household","cleaning_paper",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#3
⏱️ 1094.79 мс
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:
["household","cleaning_paper",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#4
⏱️ 1.58 мс
select * from "canonical_products" where "canonical_products"."id" in (12, 25)
#5
⏱️ 0.91 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[12,25]
#6
⏱️ 25.96 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[56112702,56109693,56108690,56108688,56108187,56108186,10880869,7486186,7473385,4649624,4531886,4283415,4208773,4201818,4097001,4086823,4054016,4037621,4031222,4025282,4003074,4003069,4003068,3996093,3987329,3971186,3605546,3411661,2807242,2742043,2715904,2702341,2956794,2676233,2657025,2657391,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#7
⏱️ 1.32 мс
select * from "stores" where "stores"."id" in (212, 223, 226, 231, 1118, 1181, 1221, 1290)
#8
⏱️ 9.27 мс
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 = 2956794 THEN 3411661 WHEN sp.master_product_id = 3411661 THEN 3411661 WHEN sp.master_product_id = 2676233 THEN 2702341 WHEN sp.master_product_id = 2657025 THEN 2702341 WHEN sp.master_product_id = 2657391 THEN 2702341 WHEN sp.master_product_id = 2702341 THEN 2702341 ELSE sp.master_product_id END limit 500
Bindings:
[56112702,56109693,56108690,56108688,56108187,56108186,10880869,7486186,7473385,4649624,4531886,4283415,4208773,4201818,4097001,4086823,4054016,4037621,4031222,4025282,4003074,4003069,4003068,3996093,3987329,3971186,3605546,3411661,2807242,2742043,2715904,2702341,2956794,2676233,2657025,2657391,0,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#9
⏱️ 5.91 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[29410733,29411947,2028869,10576735,2037305,33463834,2315398,11249429,2307961,78086048,11262307,71862359,11433390,2361524,11427323,89317000,90514626,90498462,2557761,90515232,12151007,90540139,90541323,12168535,90540049,2559095,98408517,60091749,60111807,60130438,60130439,60130945,60114305,60129873,60097048,60130440,60091727,60114308,98410814,98425035,78516167,60090936,60090937,98408653,60092772,98412164,111085207]
#10
⏱️ 2.39 мс
select * from "stores" where "stores"."id" in (431, 454, 458, 492, 493, 567)
#11
⏱️ 3.69 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#12
⏱️ 3.41 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.09 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]