#1
⏱️ 146.3 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramla"]
#2
⏱️ 1324.93 мс
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:
["snacks",462,470,521,true,462,470,521]
#3
⏱️ 498.25 мс
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:
["snacks",462,470,521,true,462,470,521]
#4
⏱️ 12.42 мс
select * from "canonical_products" where "canonical_products"."id" in (224)
#5
⏱️ 8.98 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[224]
#6
⏱️ 14.63 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[74076446,72978997,32975885,32975875,32975867,32975846,8775798,8775778,8775717,8775540,5127697,4985151,4432652,3976565,3927220,3886174,3880117,3855376,3854696,3854695,3837460,3711116,3639142,3364920,3253804,3052959,2959544,2871877,2801360,2726805,2710102,2671000,1453483,true,462,470,521]
#7
⏱️ 5.87 мс
select * from "stores" where "stores"."id" in (521)
#8
⏱️ 14.44 мс
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:
[74076446,72978997,32975885,32975875,32975867,32975846,8775798,8775778,8775717,8775540,5127697,4985151,4432652,3976565,3927220,3886174,3880117,3855376,3854696,3854695,3837460,3711116,3639142,3364920,3253804,3052959,2959544,2871877,2801360,2726805,2710102,2671000,1453483,0,462,470,521]
#9
⏱️ 35.58 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[13962368,13948724,11574888,29972023,11587583,2408352,68199367,78276431,78276430,2476533,2476370,33669037,2476680,33672239,31539070,31539071,31522270,33670978,33668180,2474758,2473551,33658190,33658724,33658748,33658878,50150447,50150360,9592649,9592718,9603666,9592787,73966,9560610,9571650,9604471,9613280]
#10
⏱️ 10.1 мс
select * from "stores" where "stores"."id" in (462, 470, 521)
#11
⏱️ 10.11 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramla"]
#12
⏱️ 11.35 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.46 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]