#1
⏱️ 129.65 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 1098.32 мс
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:
["grocery",287,true,287]
#3
⏱️ 445.87 мс
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:
["grocery",287,true,287]
#4
⏱️ 8.11 мс
select * from "canonical_products" where "canonical_products"."id" in (64)
#5
⏱️ 7.21 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[64]
#6
⏱️ 37.79 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[39417299,2037598,1919768,1919767,1918295,1913217,1913216,1912286,1912018,1911972,1910474,1910364,1910363,1909890,1909369,1909358,1908616,1908615,1908290,1908153,1908144,1468660,1465150,1463675,1463665,1462258,1462252,1462251,1462250,1462249,1462248,1458610,130435,true,287]
#7
⏱️ 2.75 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 22.59 мс
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 = 1465150 THEN 1465150 WHEN sp.master_product_id = 130435 THEN 1465150 ELSE sp.master_product_id END limit 500
Bindings:
[39417299,2037598,1919768,1919767,1918295,1913217,1913216,1912286,1912018,1911972,1910474,1910364,1910363,1909890,1909369,1909358,1908616,1908615,1908290,1908153,1908144,1468660,1465150,1463675,1463665,1462258,1462252,1462251,1462250,1462249,1462248,1458610,130435,0,287]
#9
⏱️ 14.55 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5286944,5271684,5271685,5271686,5271687,5271688,5271694,5276476,5276484,5279362,5276567,5276575,5276712,5279078,5279079,5281802,5281806,5284327,5286791,5286792,5286918,5294092,5294132,5296411,5271714,5271715,5294013,5271788,5271789,85127578]
#10
⏱️ 12.66 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 11.06 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#12
⏱️ 13.13 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.78 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]