#1
⏱️ 148.49 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"zikhron-yaakov"]
#2
⏱️ 63.7 мс
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",347,443,616,435,true,347,443,616,435]
#3
⏱️ 38.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:
["appliances","kitchen_appliances",347,443,616,435,true,347,443,616,435]
#4
⏱️ 9.02 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 6.37 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 10.77 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[2707089,2670268,2657025,2641224,2636108,207687,207685,190949,101406,4616061,4578147,4578144,4562159,4562158,4545435,4531002,4531001,4529780,4524308,4523873,4523872,2976294,2956793,2840407,2675174,2662692,2662614,2660699,2660095,2659912,2659907,2659890,2657391,2676233,2702341,true,347,443,616,435]
#7
⏱️ 6.53 мс
select * from "stores" where "stores"."id" in (347)
#8
⏱️ 16.56 мс
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 = 2657391 THEN 2657025 WHEN sp.master_product_id = 2657025 THEN 2657025 WHEN sp.master_product_id = 2676233 THEN 2657025 WHEN sp.master_product_id = 2702341 THEN 2657025 ELSE sp.master_product_id END limit 500
Bindings:
[2707089,2670268,2657025,2641224,2636108,207687,207685,190949,101406,4616061,4578147,4578144,4562159,4562158,4545435,4531002,4531001,4529780,4524308,4523873,4523872,2976294,2956793,2840407,2675174,2662692,2662614,2660699,2660095,2659912,2659907,2659890,2657391,2676233,2702341,0,347,443,616,435]
#9
⏱️ 8.57 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5337270,2085039,2087403,2087434,2087456,2088560,2088941,2086613,2087965,2087076,1829716,1823603,1824652,1826930,1826765,1819964,1830934,1825124,1823947,1830819,1823534,2891938,2897867,2897869,2891395,7938017,2891844,7949344,2898464,7951966,2901369,7951989,7951990,7938426,2891842,2898455]
#10
⏱️ 5 мс
select * from "stores" where "stores"."id" in (347, 435, 443, 616)
#11
⏱️ 4.48 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["zikhron-yaakov"]
#12
⏱️ 1.85 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 5.7 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]