#1
⏱️ 62.81 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"netivot"]
#2
⏱️ 408.78 мс
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",445,623,true,445,623]
#3
⏱️ 84.85 мс
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",445,623,true,445,623]
#4
⏱️ 1.18 мс
select * from "canonical_products" where "canonical_products"."id" in (145)
#5
⏱️ 3.09 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[145]
#6
⏱️ 4.98 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[4990576,4990374,4988227,4987429,3458976,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1469150,1455751,685427,364789,256300,199856,195457,194598,193051,192327,189702,175170,175169,171783,168568,164100,164080,192386,true,445,623]
#7
⏱️ 4.07 мс
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,3458976,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1469150,1455751,685427,364789,256300,199856,195457,194598,193051,192327,189702,175170,175169,171783,168568,164100,164080,192386,0,445,623]
#8
⏱️ 19.66 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[94065943,2221784,2220961,2216364,2222355,10958096,2212456,35231777,2216433,33372138,77896289,2222173,2222597,2214452,2218670,29593663,31245802,2210873,2223097,2223899,10975204,97399832,3012380,12352017,11728456,3008529,3009019,3010196,3010874,3014358,3010755,12351385,12362553,12359674,12357257,12359556,12362310,12362512]
#9
⏱️ 2.46 мс
select * from "stores" where "stores"."id" in (445, 623)
#10
⏱️ 2.83 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["netivot"]
#11
⏱️ 2.32 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 7.78 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]