#1
⏱️ 37.42 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kiryat-shmona"]
#2
⏱️ 216.07 мс
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",125,452,true,125,452]
#3
⏱️ 108.28 мс
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",125,452,true,125,452]
#4
⏱️ 3.03 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 1.94 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 2.54 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[74076446,72978997,7252747,3639142,3605772,3173989,2896439,2871877,2847887,2839551,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2656883,2648342,2647546,2641936,2632516,2631106,2630703,1912560,1910802,1461002,1458241,1457611,1457103,3702666,true,125,452]
#7
⏱️ 2.33 мс
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,7252747,3639142,3605772,3173989,2896439,2871877,2847887,2839551,2726805,2710102,2671000,2670972,2667237,2660887,2659969,2657438,2657033,2656883,2648342,2647546,2641936,2632516,2631106,2630703,1912560,1910802,1461002,1458241,1457611,1457103,3702666,0,125,452]
#8
⏱️ 5.39 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[11232528,11225051,31324314,29748931,82700828,33458425,11203978,11207041,11218975,11208330,2299043,29755370,31320939,2293346,11202395,11229790,33449879,11206793,11219246,31333792,33448639,29768969,31321026,33457370,31329109,29752486,29768106,31327222,78068660,2301485,68001038,78077446]
#9
⏱️ 1.85 мс
select * from "stores" where "stores"."id" in (452)
#10
⏱️ 2.82 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kiryat-shmona"]
#11
⏱️ 1.33 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 3.36 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]