#1
⏱️ 162.64 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"holon"]
#2
⏱️ 2020.61 мс
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:
["grocery","baking_spices",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
⏱️ 884.91 мс
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:
["grocery","baking_spices",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.5 мс
select * from "canonical_products" where "canonical_products"."id" in (57)
#5
⏱️ 14.25 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[57]
#6
⏱️ 135.68 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,12196440,4415637,4322833,4174891,4148882,4107700,4060426,4053353,4031498,4031495,4030805,4002769,3991036,3986018,3984999,3973055,3971747,2975340,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1474523,1472108,1472107,2261290,4041677,162154,154967,162805,3253825,true,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#7
⏱️ 15.03 мс
select * from "stores" where "stores"."id" in (234, 253)
#8
⏱️ 37.74 мс
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 = 4148882 THEN 4148882 WHEN sp.master_product_id = 2261290 THEN 4148882 WHEN sp.master_product_id = 4041677 THEN 4148882 WHEN sp.master_product_id = 4415637 THEN 4148882 WHEN sp.master_product_id = 162154 THEN 4148882 WHEN sp.master_product_id = 154967 THEN 4148882 WHEN sp.master_product_id = 162805 THEN 4148882 WHEN sp.master_product_id = 3253825 THEN 4148882 ELSE sp.master_product_id END limit 500
Bindings:
[12196449,12196440,4415637,4322833,4174891,4148882,4107700,4060426,4053353,4031498,4031495,4030805,4002769,3991036,3986018,3984999,3973055,3971747,2975340,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1474523,1472108,1472107,2261290,4041677,162154,154967,162805,3253825,0,1114,234,752,1168,1216,1327,167,528,463,497,552,573,665,678,1411,23,145,253,360]
#9
⏱️ 55.19 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5810529,5298166,5298167,5309392,13979432,11593926,11594522,11614829,11622180,11629400,11604581,11594743,2418465,2419626,47189756,47775158,90645846,53088313,90662449,90648410,90670241,90654783,24742388,99001055,99002326,3536840,24753173,3545354,78280002,24753405,99000630,24742696,3535784,3537573,24743133,111702225,68521059,97336121,60306359,97380218,97383029,60308124,60339594,98527175,60340832,60306663,3668319,60308132,24892275,78598054,60339513,1758288,6804955,1756184,1763750,1754569,32915929,1754647,1758118,29153031,1754672]
#10
⏱️ 22.68 мс
select * from "stores" where "stores"."id" in (234, 253, 463, 497, 552, 573, 752)
#11
⏱️ 9 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["holon"]
#12
⏱️ 12.98 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 10.86 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]