#1
⏱️ 184.9 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rehovot"]
#2
⏱️ 1451.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:
["household","cleaning_paper",1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173,true,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#3
⏱️ 981.75 мс
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:
["household","cleaning_paper",1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173,true,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#4
⏱️ 16.91 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4978186,4609553,4578361,4003068,2413856,2413855,2178279,1551600,1516114,1515669,1501043,1477928,1472874,1452544,1452543,1438523,1438359,1438201,1437529,1437316,1434060,1433671,1432944,1432943,1432702,1432700,1432697,1432693,1432357,1429931,1429495,1428728,true,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#5
⏱️ 3.64 мс
select * from "stores" where "stores"."id" in (173, 215, 349, 390)
#6
⏱️ 17.94 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4978186,4609553,4578361,4003068,2413856,2413855,2178279,1551600,1516114,1515669,1501043,1477928,1472874,1452544,1452543,1438523,1438359,1438201,1437529,1437316,1434060,1433671,1432944,1432943,1432702,1432700,1432697,1432693,1432357,1429931,1429495,1428728,0,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#7
⏱️ 1.81 мс
select * from "stores" where "stores"."id" in (173, 215, 349, 390, 455, 550, 597, 768)
#8
⏱️ 6.58 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rehovot"]
#9
⏱️ 8.65 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 4.31 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]