#1
⏱️ 116.53 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"holon"]
#2
⏱️ 4025.55 мс
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",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
⏱️ 2815.46 мс
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",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
⏱️ 10.46 мс
select * from "canonical_products" where "canonical_products"."id" in (25, 38)
#5
⏱️ 6.45 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[25,38]
#6
⏱️ 236.84 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[56112702,56109693,56108688,56108187,56108186,24332368,13094227,10880869,8775654,7486186,4649624,4531886,4208773,4178083,4086823,4084217,4084216,4079136,4025282,4003074,4003069,3996093,3974210,3971186,3340041,2807242,2798322,2742043,2715904,2702341,2672991,2672977,2676233,2657391,2657025,2681555,2672969,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#7
⏱️ 15.57 мс
select * from "stores" where "stores"."id" in (234, 253, 528, 1114, 1168, 1216, 1327, 1411)
#8
⏱️ 30.64 мс
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 = 2676233 THEN 2702341 WHEN sp.master_product_id = 2657391 THEN 2702341 WHEN sp.master_product_id = 2657025 THEN 2702341 WHEN sp.master_product_id = 2702341 THEN 2702341 WHEN sp.master_product_id = 2681555 THEN 2672977 WHEN sp.master_product_id = 2672969 THEN 2672977 WHEN sp.master_product_id = 2672977 THEN 2672977 ELSE sp.master_product_id END limit 500
Bindings:
[56112702,56109693,56108688,56108187,56108186,24332368,13094227,10880869,8775654,7486186,4649624,4531886,4208773,4178083,4086823,4084217,4084216,4079136,4025282,4003074,4003069,3996093,3974210,3971186,3340041,2807242,2798322,2742043,2715904,2702341,2672991,2672977,2676233,2657391,2657025,2681555,2672969,0,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#9
⏱️ 37.46 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[33580208,33580282,2422610,30001429,11616489,33581024,12209174,78645825,9603573,9570246,9581355,9798204,24741697,78257174,24747418,80445796,73835811,3541262,24742794,3544290,3544291,24746372,3544213,62527116,73827461,60303651,60307756,24895160,24895519,24892664,60303470,60318726,78596661,78576755,78576756,78599993,1753601,6803441,6803314,29141633,29150493]
#10
⏱️ 7.51 мс
select * from "stores" where "stores"."id" in (463, 497, 528, 552, 573, 752)
#11
⏱️ 7.52 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["holon"]
#12
⏱️ 12.11 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 9.24 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]