#1
⏱️ 188.13 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bat-yam"]
#2
⏱️ 730.09 мс
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",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#3
⏱️ 471.09 мс
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",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#4
⏱️ 16.37 мс
select * from "canonical_products" where "canonical_products"."id" in (224)
#5
⏱️ 8.56 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[224]
#6
⏱️ 16.04 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[108808721,108787969,5127697,4990833,4990832,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984783,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4546366,4546223,4536177,3854695,3711116,3556383,3253804,2750558,2742017,2671000,1453483,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#7
⏱️ 4.87 мс
select * from "stores" where "stores"."id" in (124, 318, 409)
#8
⏱️ 9.63 мс
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:
[108808721,108787969,5127697,4990833,4990832,4990772,4990715,4990523,4988820,4988768,4986683,4986363,4986222,4985770,4984783,4984678,4984486,4984020,4984009,4983892,4983757,4983651,4546366,4546223,4536177,3854695,3711116,3556383,3253804,2750558,2742017,2671000,1453483,0,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#9
⏱️ 34.27 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[103303554,104921331,100002585,112254250,2378270,68135072,33526195,89386221,89386225,3228161,3225074,11434167,11464571,11465717,3223293,3223399,3223534,3223651,3223662,3224128,3224320,3224425,3225412,3225864,3226005,3226325,3228410,3228462,3230165,3230357,3230414,3230474,3230475,86613382,6800592,32900162,32912977,79015687,79015689]
#10
⏱️ 10.33 мс
select * from "stores" where "stores"."id" in (124, 318, 409, 459, 618, 751)
#11
⏱️ 10.95 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bat-yam"]
#12
⏱️ 14.43 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 16.72 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]