#1
⏱️ 154.3 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"herzliya"]
#2
⏱️ 1105.3 мс
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:
["dairy","cheese",2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,494,560,652,1380,358,383,198,true,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,494,560,652,1380,358,383,198]
#3
⏱️ 731.63 мс
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:
["dairy","cheese",2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,494,560,652,1380,358,383,198,true,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,494,560,652,1380,358,383,198]
#4
⏱️ 19.92 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 18.93 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 33.38 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,11135534,8314242,4990037,4988786,4987083,4986561,4985410,4279811,4242981,4213380,4085256,4019922,3985099,3974567,2679096,2668915,2611955,2611893,2611879,2611240,2611239,2611238,1454587,847390,595069,506851,441481,211379,198388,190709,190700,true,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,494,560,652,1380,358,383,198]
#7
⏱️ 13.8 мс
select * from "stores" where "stores"."id" in (358, 542)
#8
⏱️ 22.07 мс
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 = 4085256 THEN 4019922 WHEN sp.master_product_id = 4019922 THEN 4019922 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,11135534,8314242,4990037,4988786,4987083,4986561,4985410,4279811,4242981,4213380,4085256,4019922,3985099,3974567,2679096,2668915,2611955,2611893,2611879,2611240,2611239,2611238,1454587,847390,595069,506851,441481,211379,198388,190709,190700,0,2,542,761,1141,1157,1194,1219,1223,714,626,647,1343,158,494,560,652,1380,358,383,198]
#9
⏱️ 42.18 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[781002,36360819,362045,372549,78763156,38105135,76806611,67996117,59839221,59861403,3588548,2925790,2925799,2933690,2935688,3235680,11492078,3237074,3237157,3234751,3234752,3234750,3234749,3231064,3234748,3234743,2925665,2925789,3232524,3233675,3234197,3235900,3237151]
#10
⏱️ 10.93 мс
select * from "stores" where "stores"."id" in (358, 542, 560, 626)
#11
⏱️ 10.61 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["herzliya"]
#12
⏱️ 6.56 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.65 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]