#1
⏱️ 27.45 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"katzrin"]
#2
⏱️ 370.97 мс
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
⏱️ 154.9 мс
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
⏱️ 6.06 мс
select * from "canonical_products" where "canonical_products"."id" in (64, 264)
#5
⏱️ 3.7 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[64,264]
#6
⏱️ 16.57 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[2037598,1919768,1919767,1918295,1913217,1913216,1912286,1912018,1911972,1910474,1910364,1910363,1909890,1909369,1909358,1908616,1908615,1908290,1908153,1908144,1465150,1463675,1463665,1462258,1462252,1462251,1462250,1462249,1462248,1458610,1458529,1458528,130435,98914,true,287]
#7
⏱️ 3.23 мс
select * from "stores" where "stores"."id" in (287)
#8
⏱️ 5.18 мс
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 WHEN sp.master_product_id = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[2037598,1919768,1919767,1918295,1913217,1913216,1912286,1912018,1911972,1910474,1910364,1910363,1909890,1909369,1909358,1908616,1908615,1908290,1908153,1908144,1465150,1463675,1463665,1462258,1462252,1462251,1462250,1462249,1462248,1458610,1458529,1458528,130435,98914,0,287]
#9
⏱️ 9.85 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5286874,5286875,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
⏱️ 1.45 мс
select * from "stores" where "stores"."id" in (287)
#11
⏱️ 5.04 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["katzrin"]
#12
⏱️ 3.9 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 4.46 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]