#1
⏱️ 139.33 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bat-yam"]
#2
⏱️ 467.59 мс
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:
["baby",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#3
⏱️ 230.96 мс
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:
["baby",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#4
⏱️ 41.42 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[14970397,8775937,8775934,4987857,4985731,2864871,2634246,2634027,1831540,1690015,1515428,1509619,1506060,1493149,1490611,1477016,1476909,1476886,1474652,1474648,1472122,1472111,1438359,1436870,1436355,1436259,1434564,1434563,1434562,1434561,1434559,1434552,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#5
⏱️ 6.8 мс
select * from "stores" where "stores"."id" in (232, 1121, 1250, 1260)
#6
⏱️ 9.68 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[14970397,8775937,8775934,4987857,4985731,2864871,2634246,2634027,1831540,1690015,1515428,1509619,1506060,1493149,1490611,1477016,1476909,1476886,1474652,1474648,1472122,1472111,1438359,1436870,1436355,1436259,1434564,1434563,1434562,1434561,1434559,1434552,0,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#7
⏱️ 6.16 мс
select * from "stores" where "stores"."id" in (232, 459, 618, 751)
#8
⏱️ 3.02 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bat-yam"]
#9
⏱️ 13.32 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 10.61 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]