#1
⏱️ 208.52 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"akko"]
#2
⏱️ 300.14 мс
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",11,442,686,1368,221,true,11,442,686,1368,221]
#3
⏱️ 112.8 мс
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",11,442,686,1368,221,true,11,442,686,1368,221]
#4
⏱️ 9.07 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 3.01 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 17.15 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[2816262,2782222,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2664339,2663976,2662602,2662458,2661254,2657025,2641224,2638261,2636108,1433572,1427304,135093,101406,105059205,104968190,104952339,61502055,56766197,56766180,55879762,24653194,24636558,2657391,2702341,true,11,442,686,1368,221]
#7
⏱️ 10.24 мс
select * from "stores" where "stores"."id" in (11, 221)
#8
⏱️ 20.64 мс
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,2708626,2707089,2702790,2685471,2676233,2675929,2671430,2670760,2664339,2663976,2662602,2662458,2661254,2657025,2641224,2638261,2636108,1433572,1427304,135093,101406,105059205,104968190,104952339,61502055,56766197,56766180,55879762,24653194,24636558,2657391,2702341,0,11,442,686,1368,221]
#9
⏱️ 32.15 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1587592,1587708,1589319,6106788,6112565,2182236,2188982,2185287,2194522,2182715,2193922,2193284,33336768,2181686,10887647,33334757,10889173,31214976,2194452,2187019,2189505,2193883,2185290,10900431,29557808,24327447,46713540,46713620,61895587,37063466,67822845,77827473,82509587]
#10
⏱️ 5.91 мс
select * from "stores" where "stores"."id" in (11, 221, 442)
#11
⏱️ 12.12 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["akko"]
#12
⏱️ 10.17 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 9.86 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]