#1
⏱️ 62.06 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 820.74 мс
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",287,true,287]
#3
⏱️ 273.82 мс
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",287,true,287]
#4
⏱️ 3.5 мс
select * from "canonical_products" where "canonical_products"."id" in (344)
#5
⏱️ 5.51 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[344]
#6
⏱️ 19.35 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[1942768,1942767,1915305,1915058,1912560,1911990,1910510,1910304,1910197,1909873,1909866,1909865,1467822,1467821,1461586,1461585,1461584,1461407,1461266,1461263,1461236,1461069,1461068,1461067,1460960,1458363,1458351,1458346,1458272,1458241,1458209,1457763,1461403,true,287]
#7
⏱️ 4.95 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 9.15 мс
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 = 1461403 THEN 1461407 WHEN sp.master_product_id = 1461407 THEN 1461407 ELSE sp.master_product_id END limit 500
Bindings:
[1942768,1942767,1915305,1915058,1912560,1911990,1910510,1910304,1910197,1909873,1909866,1909865,1467822,1467821,1461586,1461585,1461584,1461407,1461266,1461263,1461236,1461069,1461068,1461067,1460960,1458363,1458351,1458346,1458272,1458241,1458209,1457763,1461403,0,287]
#9
⏱️ 9.67 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5284401,5286647,5286668,5286698,23224931,5286733,5286745,5296687,5296729,5296730,5296731,5297232,5297246,5297248,5297327,5297513,5297514,5297515,5286746,5284298,5284299,5284306,5286615,5286729,5286952,5294107,5296706,5279454,5281664,21594443,25071934]
#10
⏱️ 1.45 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 4.36 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#12
⏱️ 4.02 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 8.9 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]