#1
⏱️ 91.5 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 3914.94 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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",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
⏱️ 1313.66 мс
select * from "master_products" where "barcode" is not null and "category_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",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
⏱️ 3.72 мс
select * from "canonical_products" where "canonical_products"."id" in (12)
#5
⏱️ 4.5 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[12]
#6
⏱️ 9.39 мс
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,4405285,4283415,4208773,4201818,4097001,4086823,4054016,4037621,4031222,4025282,4003074,4003069,4003068,3996093,3987329,3974210,3971186,3605546,3411661,2807242,2742043,2956794,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 мс
select * from "stores" where "stores"."id" in (212, 223, 226, 231, 1118, 1181, 1221, 1290)
#8
⏱️ 7.86 мс
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 ELSE sp.master_product_id END limit 500
Bindings:
[56112702,56109693,56108690,56108688,56108187,56108186,10880869,7486186,7473385,4649624,4531886,4405285,4283415,4208773,4201818,4097001,4086823,4054016,4037621,4031222,4025282,4003074,4003069,4003068,3996093,3987329,3974210,3971186,3605546,3411661,2807242,2742043,2956794,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
⏱️ 14.29 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2028869,10576735,2037305,11249429,2307961,78086048,11262307,71862359,2361524,11427323,89317000,90498462,2557761,90515232,12151007,90541323,12168535,90540049,2559095,98408517,60097003,60091749,60111807,60130438,60130439,60130945,60114305,60129873,60097048,60130440,60091727,60114308,98410814,98425035,78516167,111064290,60090936,60090937,98408653,60092772,98412164,111085207]
#10
⏱️ 4.07 мс
select * from "stores" where "stores"."id" in (431, 454, 458, 492, 493, 567)
#11
⏱️ 5.54 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#12
⏱️ 4.08 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 7.09 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]