#1
⏱️ 171.58 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"eilat"]
#2
⏱️ 4231.08 мс
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",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#3
⏱️ 4652.34 мс
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",1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#4
⏱️ 8.24 мс
select * from "canonical_products" where "canonical_products"."id" in (8)
#5
⏱️ 10.29 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[8]
#6
⏱️ 16.69 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[75165094,63260623,36527595,30691571,25603232,11136929,7455589,7455588,7452682,7452547,7443308,7443245,7441737,7440957,7065236,6745776,6730411,4536333,4533815,4260307,4073345,4012164,3739767,3041110,2990001,2989999,2989886,2844440,2842852,2841453,2811192,2807243,1462716,3170808,160427,123050,2812826,true,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#7
⏱️ 9.98 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 180, 237, 252, 777)
#8
⏱️ 20.88 мс
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 = 1462716 THEN 3041110 WHEN sp.master_product_id = 3170808 THEN 3041110 WHEN sp.master_product_id = 160427 THEN 3041110 WHEN sp.master_product_id = 123050 THEN 3041110 WHEN sp.master_product_id = 3041110 THEN 3041110 WHEN sp.master_product_id = 2812826 THEN 3041110 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,63260623,36527595,30691571,25603232,11136929,7455589,7455588,7452682,7452547,7443308,7443245,7441737,7440957,7065236,6745776,6730411,4536333,4533815,4260307,4073345,4012164,3739767,3041110,2990001,2989999,2989886,2844440,2842852,2841453,2811192,2807243,1462716,3170808,160427,123050,2812826,0,1112,755,767,777,1143,1182,1196,1264,481,1379,21,123,148,180,237,252,363]
#9
⏱️ 25.83 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325009,68085904,103338978,868345,46143198,103051619,107173017,2525938,2522389,90195248,2524781,2526773,2522334,30238255,30239870,30239243,12063071,12064858,2526572,12070764,33790145,33790229,30239972,30239973,104223776,1797828,1791524,29178558,1792914,29181322,10312032,10312173,10312185,1791884,29178124,1793199,1794514,10305390,88601032,528042]
#10
⏱️ 12.42 мс
select * from "stores" where "stores"."id" in (21, 123, 148, 252, 481, 755, 767)
#11
⏱️ 11.38 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["eilat"]
#12
⏱️ 11.92 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.15 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]