#1
⏱️ 97.87 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bnei-brak"]
#2
⏱️ 3124.45 мс
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",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
⏱️ 1610.05 мс
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",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
⏱️ 4.11 мс
select * from "canonical_products" where "canonical_products"."id" in (8)
#5
⏱️ 1.72 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[8]
#6
⏱️ 188.21 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[75165094,39417299,30691571,25603232,11135321,8775770,8775716,7529533,7520039,7518269,7455589,7455588,7443308,7443245,7440957,7065236,6745776,6730411,4987518,4536333,4533815,4012164,3931378,3925377,3739767,3230535,3041110,2991635,2990001,2864978,2844440,2842852,3170808,1462716,123050,160427,2812826,true,730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298]
#7
⏱️ 6.88 мс
select * from "stores" where "stores"."id" in (84, 135, 217, 265, 282, 288, 730)
#8
⏱️ 16.47 мс
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 = 3170808 THEN 3041110 WHEN sp.master_product_id = 1462716 THEN 3041110 WHEN sp.master_product_id = 123050 THEN 3041110 WHEN sp.master_product_id = 3041110 THEN 3041110 WHEN sp.master_product_id = 160427 THEN 3041110 WHEN sp.master_product_id = 2812826 THEN 3041110 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,39417299,30691571,25603232,11135321,8775770,8775716,7529533,7520039,7518269,7455589,7455588,7443308,7443245,7440957,7065236,6745776,6730411,4987518,4536333,4533815,4012164,3931378,3925377,3739767,3230535,3041110,2991635,2990001,2864978,2844440,2842852,3170808,1462716,123050,160427,2812826,0,730,748,288,45,80,135,163,432,477,502,682,84,86,217,265,282,285,298]
#9
⏱️ 26.54 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5916943,67866182,29420029,2048281,2042771,33192397,29429193,29431503,10583561,10584987,15447047,59573994,2508693,12028151,30207200,12022334,47557816,12025245,33761819,2511828,30207029,2504326,2504327,62590936,19024409,78674433,12250401,30362224,12253417,56643143,30364597,35928496,30365849,19022076,2602473,19027698,12247000,47833660,9603696,9593116,9604294,1697620,29087471,29097308,12709041,6756292,6755688,32867786,55713030]
#10
⏱️ 3.22 мс
select * from "stores" where "stores"."id" in (135, 432, 477, 502, 730, 748)
#11
⏱️ 2.43 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bnei-brak"]
#12
⏱️ 2.32 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.59 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]