#1
⏱️ 191.91 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"holon"]
#2
⏱️ 4395.09 мс
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:
["grocery",1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#3
⏱️ 3590.41 мс
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:
["grocery",1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#4
⏱️ 16.88 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[117041541,117041540,75165094,70704639,66413048,37085091,34793660,34205246,30691571,27628022,25912188,25603232,25491028,12196449,12196440,12096078,8775770,8775716,8616048,7529533,7520039,7504693,7499337,7495251,7455588,7452547,7443245,7065236,6745776,6730411,4987518,4985767,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#5
⏱️ 7.5 мс
select * from "stores" where "stores"."id" in (234, 253, 528)
#6
⏱️ 11.1 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[117041541,117041540,75165094,70704639,66413048,37085091,34793660,34205246,30691571,27628022,25912188,25603232,25491028,12196449,12196440,12096078,8775770,8775716,8616048,7529533,7520039,7504693,7499337,7495251,7455588,7452547,7443245,7065236,6745776,6730411,4987518,4985767,0,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#7
⏱️ 4.95 мс
select * from "stores" where "stores"."id" in (253, 463, 497, 528, 552, 573, 752)
#8
⏱️ 4.84 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["holon"]
#9
⏱️ 3.95 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 11.08 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]