#1
⏱️ 26.25 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 311.94 мс
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",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
⏱️ 242.65 мс
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",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
⏱️ 6.1 мс
select * from "canonical_products" where "canonical_products"."id" in (224)
#5
⏱️ 6.07 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[224]
#6
⏱️ 8.39 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[63265682,7472064,7460691,7443272,7443271,7443269,4146579,4101805,4101804,4061365,4039055,4029534,4023615,4018865,4016455,4016454,4014206,4001173,3991805,3991003,3990910,3990909,3990908,3990907,3990906,3990153,3989817,3978860,3949529,3711116,3646080,3605772,1453483,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
⏱️ 12.72 мс
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 = 1453483 THEN 3711116 WHEN sp.master_product_id = 3711116 THEN 3711116 ELSE sp.master_product_id END limit 500
Bindings:
[63265682,7472064,7460691,7443272,7443271,7443269,4146579,4101805,4101804,4061365,4039055,4029534,4023615,4018865,4016455,4016454,4014206,4001173,3991805,3991003,3990910,3990909,3990908,3990907,3990906,3990153,3989817,3978860,3949529,3711116,3646080,3605772,1453483,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]
#8
⏱️ 13.76 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1614133,11263024,33462976,2311537,33514605,12151017,12151052,2558448,2558450,2558503,12159100,12159101,79858604,2563866,2563868,2563869,56598488,72648112,3625640,60131947,24856962,3624167,60097828,60097829,60097830,60097831,60097832,24854939,60100364,60125719,60130352,60092617,60092618,60097780,60110118,60125718,60100332,60098980,60125716,60125717]
#9
⏱️ 3.11 мс
select * from "stores" where "stores"."id" in (16, 454, 458, 492, 493, 567)
#10
⏱️ 5.92 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#11
⏱️ 3.01 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 5.24 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]