#1
⏱️ 38.69 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"akko"]
#2
⏱️ 233.3 мс
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",11,442,686,1368,221,true,11,442,686,1368,221]
#3
⏱️ 156.2 мс
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",11,442,686,1368,221,true,11,442,686,1368,221]
#4
⏱️ 3.28 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 1.56 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 1.6 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[74076446,72978997,63265682,3646080,3639142,3556383,3395115,3364920,3052959,2871877,2847887,2750558,2742017,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2648342,2647546,2641936,2632516,2631106,2630703,2067877,2047938,1922599,1912560,3702666,true,11,442,686,1368,221]
#7
⏱️ 2.11 мс
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,63265682,3646080,3639142,3556383,3395115,3364920,3052959,2871877,2847887,2750558,2742017,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2648342,2647546,2641936,2632516,2631106,2630703,2067877,2047938,1922599,1912560,3702666,0,11,442,686,1368,221]
#8
⏱️ 17.45 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[10899034,2190627,29562092,2183095,2184305,2184435,2187055,2194435,33331344,2190049,2181820,2182547,31217325,2186616,2194120,2185603,2192732,10867503,2194436,33344173,10884722,2190052,31218078,33333767,67826380,2181649,2181648,31218067,67834466,39073748,56187732,67833888]
#9
⏱️ 1.78 мс
select * from "stores" where "stores"."id" in (442)
#10
⏱️ 1.65 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["akko"]
#11
⏱️ 1.29 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 1.58 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]