#1
⏱️ 141.58 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"krayot"]
#2
⏱️ 1041.59 мс
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",735,1188,1293,290,99,154,430,506,660,1397,true,735,1188,1293,290,99,154,430,506,660,1397]
#3
⏱️ 849.58 мс
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",735,1188,1293,290,99,154,430,506,660,1397,true,735,1188,1293,290,99,154,430,506,660,1397]
#4
⏱️ 47.8 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4531886,2742043,2683719,2669776,2662458,2637582,2634027,2632389,2049531,2045396,1918295,1910510,1909827,1477277,1461266,1458241,1458209,1457784,1457763,1457566,1457401,1456789,1456787,1453738,1453534,1435244,1435140,1434563,1434562,1434559,1434552,1433147,true,735,1188,1293,290,99,154,430,506,660,1397]
#5
⏱️ 8.16 мс
select * from "stores" where "stores"."id" in (99, 290, 1188, 1293, 1397)
#6
⏱️ 34.16 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4531886,2742043,2683719,2669776,2662458,2637582,2634027,2632389,2049531,2045396,1918295,1910510,1909827,1477277,1461266,1458241,1458209,1457784,1457763,1457566,1457401,1456789,1456787,1453738,1453534,1435244,1435140,1434563,1434562,1434559,1434552,1433147,0,735,1188,1293,290,99,154,430,506,660,1397]
#7
⏱️ 15.23 мс
select * from "stores" where "stores"."id" in (290, 430, 506)
#8
⏱️ 8.81 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["krayot"]
#9
⏱️ 8.04 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 12.95 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]