#1
⏱️ 48.21 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"holon"]
#2
⏱️ 416.84 мс
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:
["dairy","cheese",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
⏱️ 526.44 мс
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:
["dairy","cheese",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
⏱️ 11.7 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 12.98 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 21.96 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,11135534,8314242,4279811,4213380,4105860,4085256,3985099,3974567,2802677,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611879,2611240,2611239,1453876,595069,506850,499222,197016,188207,187933,175758,169977,169456,168764,168763,4019922,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#7
⏱️ 8.53 мс
select * from "stores" where "stores"."id" in (23, 145)
#8
⏱️ 21 мс
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 = 4085256 THEN 4085256 WHEN sp.master_product_id = 4019922 THEN 4085256 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,11135534,8314242,4279811,4213380,4105860,4085256,3985099,3974567,2802677,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611879,2611240,2611239,1453876,595069,506850,499222,197016,188207,187933,175758,169977,169456,168764,168763,4019922,0,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#9
⏱️ 40.49 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[26329273,941849,942581,30004196,2422537,2419947,2419946,2419945,2419938,2419941,2419942,11604373,2419787,2417595,12199745,3545919,3545920,3546307,3546582,57886811,24753187,3545765,3543510,24743103,24753479,78280198,3534967,3537053,11220937,26899960,3670900,3670901,3671089,24898633,60339608,60340816,60308100,3670855,60309800,60309799,37908481,10266824,1753413,32923388,32923386,32924061,32926523,32924193,32923379,32923381,10271813,29145907]
#10
⏱️ 15.22 мс
select * from "stores" where "stores"."id" in (23, 253, 463, 497, 552, 573, 752)
#11
⏱️ 9.49 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["holon"]
#12
⏱️ 18.07 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 20.11 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]