#1
⏱️ 101.05 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ariel"]
#2
⏱️ 1768.49 мс
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",162,464,263,228,true,162,464,263,228]
#3
⏱️ 660.58 мс
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",162,464,263,228,true,162,464,263,228]
#4
⏱️ 1.91 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 1.16 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 6.26 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[74076446,72978997,32975885,32975875,32975867,32975846,3886174,3880117,3364920,3253804,2959544,2871877,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2647546,2641936,2630703,2067877,1922599,1912560,1474526,1474525,1474524,1473773,1472828,1468329,3702666,true,162,464,263,228]
#7
⏱️ 1.59 мс
select * from "stores" where "stores"."id" in (228, 263)
#8
⏱️ 5.98 мс
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 = 3702666 THEN 2667237 WHEN sp.master_product_id = 2667237 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[74076446,72978997,32975885,32975875,32975867,32975846,3886174,3880117,3364920,3253804,2959544,2871877,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2647546,2641936,2630703,2067877,1922599,1912560,1474526,1474525,1474524,1473773,1472828,1468329,3702666,0,162,464,263,228]
#9
⏱️ 13.15 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5960356,5960357,5960358,5017349,30013615,68244919,33588337,33587023,56430401,56436005,56439986,31465619,68259930,2434496,33595464,68260727,33594222,33594241,56438273,33588342,33585095,68245971,33589779,68261936,68246924,68260000,68237220,68237243,68237251,68237261,72136164,72136163]
#10
⏱️ 2.04 мс
select * from "stores" where "stores"."id" in (228, 263, 464)
#11
⏱️ 3.19 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ariel"]
#12
⏱️ 2.59 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.97 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]