#1
⏱️ 42.46 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"zikhron-yaakov"]
#2
⏱️ 54.88 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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",443,616,435,347,true,443,616,435,347]
#3
⏱️ 26.04 мс
select * from "master_products" where "barcode" is not null and "category_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",443,616,435,347,true,443,616,435,347]
#4
⏱️ 4.34 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 2.72 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 3.93 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[4981873,4979747,4979741,4973497,4574975,4524453,4524307,3362845,3276113,2816262,2782222,2709647,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2662434,2661254,2657025,2641224,2638261,2636108,1426395,2657391,2702341,true,443,616,435,347]
#7
⏱️ 4.51 мс
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:
[4981873,4979747,4979741,4973497,4574975,4524453,4524307,3362845,3276113,2816262,2782222,2709647,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2670268,2664339,2663976,2662602,2662458,2662434,2661254,2657025,2641224,2638261,2636108,1426395,2657391,2702341,0,443,616,435,347]
#8
⏱️ 23.56 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[29467410,31118663,31118107,10686139,2085039,10667032,10674768,31108505,10681800,33244062,2095851,2086613,2092606,10669240,29472755,10669257,31114970,33240235,2092590,10675611,29471519,10669239,33240206,29471708,1824593,1829716,10330262,1823603,1824652,1829480,32987975,1823305,32991689,1825124,10341676,55827843,10328866,1827566,10333820,1830819,1820002,82123462,30864865,12194710,7938428,2891990,12192945,12176285,12188784,12188791,12192978]
#9
⏱️ 1.04 мс
select * from "stores" where "stores"."id" in (435, 443, 616)
#10
⏱️ 1.35 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["zikhron-yaakov"]
#11
⏱️ 1.07 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#12
⏱️ 1.38 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]