#1
⏱️ 98.11 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bnei-brak"]
#2
⏱️ 1676.78 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_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","chips_savory",730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298,true,730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298]
#3
⏱️ 635.15 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_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","chips_savory",730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298,true,730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298]
#4
⏱️ 8.72 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 4.3 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 38.33 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[89331054,8775798,8775778,7518346,7460691,7443272,7443271,7443269,7442349,5127697,4809781,4523221,4272168,3556383,3253804,2750558,2671000,2670972,2667237,2661881,2641893,2028648,1985561,1915058,1911990,1910802,1909873,1909865,1461227,1457875,1456789,1456787,3702666,true,730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298]
#7
⏱️ 5.31 мс
select * from "stores" where "stores"."id" in (84, 86, 282, 285, 288, 730)
#8
⏱️ 10.36 мс
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:
[89331054,8775798,8775778,7518346,7460691,7443272,7443271,7443269,7442349,5127697,4809781,4523221,4272168,3556383,3253804,2750558,2671000,2670972,2667237,2661881,2641893,2028648,1985561,1915058,1911990,1910802,1909873,1909865,1461227,1457875,1456789,1456787,3702666,0,730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298]
#9
⏱️ 29.22 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4766031,4766033,4766429,4780908,4766296,4766302,4777821,4763641,4718754,4718756,4721513,4721519,4731510,4715891,5589905,5589908,5592239,5590763,5590774,5602461,5586008,5488554,5488556,5490938,5490946,5503216,5485839,5250247,5250249,5252252,5252259,5259430,5264786,5247143,29421285,77668316,2050477,2052708,2054230,10595148,77669872,31651162,2511964,72494074,33767008,2512351,33764935,2511852,2511854,2511855,2509429,78515734,12248884,2602701,30367023,2602492,2602494,2602495,19028280,9603144,4024614,9604455,9613264,6759030,1707646,1709965,1709995]
#10
⏱️ 8.91 мс
select * from "stores" where "stores"."id" in (84, 86, 282, 285, 288, 432, 477, 502, 730, 748)
#11
⏱️ 1.5 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bnei-brak"]
#12
⏱️ 4.58 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 5.17 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]