#1
⏱️ 161.8 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"nes-ziona"]
#2
⏱️ 1074.2 мс
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","baking_spices",272,614,110,651,91,130,339,true,272,614,110,651,91,130,339]
#3
⏱️ 256.06 мс
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","baking_spices",272,614,110,651,91,130,339,true,272,614,110,651,91,130,339]
#4
⏱️ 3.46 мс
select * from "canonical_products" where "canonical_products"."id" in (145)
#5
⏱️ 2.45 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[145]
#6
⏱️ 8.36 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?)
Bindings:
[4990576,4990374,4988227,4987429,4670178,3458976,1472107,1469150,1433604,685427,364789,315368,274786,256300,206567,204335,199856,195457,195236,194752,194598,193230,193170,193051,192386,192377,192368,192327,189702,168568,168014,164100,true,272,614,110,651,91,130,339]
#7
⏱️ 1.98 мс
select * from "stores" where "stores"."id" in (91, 110, 130, 272, 339)
#8
⏱️ 7.79 мс
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 = 192386 THEN 192327 WHEN sp.master_product_id = 192327 THEN 192327 ELSE sp.master_product_id END limit 500
Bindings:
[4990576,4990374,4988227,4987429,4670178,3458976,1472107,1469150,1433604,685427,364789,315368,274786,256300,206567,204335,199856,195457,195236,194752,194598,193230,193170,193051,192386,192377,192368,192327,189702,168568,168014,164100,0,272,614,110,651,91,130,339]
#9
⏱️ 14.67 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6537783,6149590,6149652,6135898,6138419,5494326,5507476,2886821,3201789,2878639,2881581,2881622,7920013,2882311,2882456,2882515,2883952,2884130,2884590,2884851,2889570,76795833,2884818,3201657,12172780,3207717,3205445,7925931,3204529,3205327,3207474,3207676]
#10
⏱️ 3.04 мс
select * from "stores" where "stores"."id" in (110, 130, 272, 339, 614)
#11
⏱️ 1.32 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["nes-ziona"]
#12
⏱️ 3 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.88 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]