#1
⏱️ 43.36 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"bat-yam"]
#2
⏱️ 222.24 мс
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:
["appliances","kitchen_appliances",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#3
⏱️ 197.41 мс
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:
["appliances","kitchen_appliances",751,1121,1250,1260,618,459,676,675,677,124,232,318,409,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#4
⏱️ 7.05 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 3.8 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 19.71 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[2816262,2782222,2770206,2708626,2707089,2702790,2685471,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2661254,2657025,2641224,2638261,2636108,1493148,1433572,1427304,1426953,1426465,1425368,1422114,1422113,1421114,1420874,1419338,1419028,2676233,2657391,2702341,true,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#7
⏱️ 9.99 мс
select * from "stores" where "stores"."id" in (124, 232)
#8
⏱️ 20.83 мс
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 = 2676233 THEN 2657025 WHEN sp.master_product_id = 2657391 THEN 2657025 WHEN sp.master_product_id = 2657025 THEN 2657025 WHEN sp.master_product_id = 2702341 THEN 2657025 ELSE sp.master_product_id END limit 500
Bindings:
[2816262,2782222,2770206,2708626,2707089,2702790,2685471,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2661254,2657025,2641224,2638261,2636108,1493148,1433572,1427304,1426953,1426465,1425368,1422114,1422113,1421114,1420874,1419338,1419028,2676233,2657391,2702341,0,751,1121,1250,1260,618,459,676,675,677,124,232,318,409]
#9
⏱️ 29.6 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5850779,5861540,23000943,33524970,2372180,2374869,2373538,11450058,11450059,2374867,2374615,2372184,29907233,33533964,2374870,2379177,33529633,33525230,11450060,2367302,2372182,33533963,6801239,29133686,1741634,6800852,1751085,29125496,29125746,32903384,1744701,32908343,32908822,1743305,1751914,1752137,32910012,32913054,29133688,32911759]
#10
⏱️ 10.4 мс
select * from "stores" where "stores"."id" in (232, 459, 751)
#11
⏱️ 6.83 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["bat-yam"]
#12
⏱️ 7.04 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 7.11 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]