#1
⏱️ 138.01 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"nahariya"]
#2
⏱️ 826.52 мс
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:
["grocery","sauces_oils",766,1123,1254,410,446,1362,10,241,true,766,1123,1254,410,446,1362,10,241]
#3
⏱️ 709.77 мс
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:
["grocery","sauces_oils",766,1123,1254,410,446,1362,10,241,true,766,1123,1254,410,446,1362,10,241]
#4
⏱️ 29.11 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4531886,2816262,2742043,2683719,2671430,2669776,2662458,2634027,2049531,2045396,1831786,1611230,1588636,1560678,1559519,1546573,1531752,1531746,1518867,1508463,1507474,1507326,1506487,1502751,1498034,1498021,1497481,1490638,1489901,1488651,1486122,1485591,true,766,1123,1254,410,446,1362,10,241]
#5
⏱️ 6.28 мс
select * from "stores" where "stores"."id" in (10, 241, 410, 1123, 1254, 1362)
#6
⏱️ 29.1 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4531886,2816262,2742043,2683719,2671430,2669776,2662458,2634027,2049531,2045396,1831786,1611230,1588636,1560678,1559519,1546573,1531752,1531746,1518867,1508463,1507474,1507326,1506487,1502751,1498034,1498021,1497481,1490638,1489901,1488651,1486122,1485591,0,766,1123,1254,410,446,1362,10,241]
#7
⏱️ 2.74 мс
select * from "stores" where "stores"."id" in (241, 446)
#8
⏱️ 11.14 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["nahariya"]
#9
⏱️ 8.81 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 13.41 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]