#1
⏱️ 201.5 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 1481.9 мс
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:
["snacks","chocolate_candy",287,true,287]
#3
⏱️ 332.53 мс
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:
["snacks","chocolate_candy",287,true,287]
#4
⏱️ 18.31 мс
select * from "canonical_products" where "canonical_products"."id" in (344)
#5
⏱️ 13.84 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[344]
#6
⏱️ 29.54 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[1942768,1942767,1915305,1910304,1910197,1909866,1467822,1467821,1461586,1461585,1461584,1461407,1461266,1461263,1461236,1461069,1461068,1461067,1460960,1458363,1458351,1458346,1458272,1458241,1458209,1457763,1457611,1457103,1456785,1456784,1456783,1456759,1461403,true,287]
#7
⏱️ 17.32 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 23.92 мс
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,1910304,1910197,1909866,1467822,1467821,1461586,1461585,1461584,1461407,1461266,1461263,1461236,1461069,1461068,1461067,1460960,1458363,1458351,1458346,1458272,1458241,1458209,1457763,1457611,1457103,1456785,1456784,1456783,1456759,1461403,0,287]
#9
⏱️ 29.98 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5281907,5281923,5281924,5281925,5284078,5284288,5284401,5286647,5286668,5286698,23224931,5286733,5286745,5296687,5296729,5296730,5296731,5297232,5297246,5297248,5297327,5297513,5297514,5297515,5286746,5284299,5286615,5286729,5281664,21594443,25071934]
#10
⏱️ 7.73 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 10.35 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#12
⏱️ 9.68 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 18.22 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]