#1
⏱️ 28.6 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"krayot"]
#2
⏱️ 92.38 мс
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",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#3
⏱️ 58.57 мс
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",735,1188,1293,290,154,430,506,660,1397,99,true,735,1188,1293,290,154,430,506,660,1397,99]
#4
⏱️ 3.7 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 0.8 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 2.9 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775816,8775815,8775810,8775804,8775803,8775802,8775801,8775755,2816262,2782222,2709647,2708626,2702790,2685471,2676233,2671430,2670760,2664339,2663976,2662602,2662458,2661254,2641224,2638261,2636108,753316,249788,244506,197314,135093,133071,123088,2657391,2657025,2702341,true,735,1188,1293,290,154,430,506,660,1397,99]
#7
⏱️ 1 мс
select * from "stores" where "stores"."id" in (99, 290, 735)
#8
⏱️ 2.9 мс
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 2676233 WHEN sp.master_product_id = 2657391 THEN 2676233 WHEN sp.master_product_id = 2657025 THEN 2676233 WHEN sp.master_product_id = 2702341 THEN 2676233 ELSE sp.master_product_id END limit 500
Bindings:
[8775816,8775815,8775810,8775804,8775803,8775802,8775801,8775755,2816262,2782222,2709647,2708626,2702790,2685471,2676233,2671430,2670760,2664339,2663976,2662602,2662458,2661254,2641224,2638261,2636108,753316,249788,244506,197314,135093,133071,123088,2657391,2657025,2702341,0,735,1188,1293,290,154,430,506,660,1397,99]
#9
⏱️ 1.9 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4387982,4405565,4393872,4390481,5184811,2013951,2026527,2024213,29399635,2019540,2027843,10543210,2018739,2022683,10538376,10542384,10533511,10542430,2015280,2026321,2017087,10540286,29395475,2027844,10539260,19063091,19076202,30387309,4026468,4027629,4027672,4027715,4027758,4027930,4028016,4028059]
#10
⏱️ 0.9 мс
select * from "stores" where "stores"."id" in (99, 290, 430, 506, 735)
#11
⏱️ 1.19 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["krayot"]
#12
⏱️ 1.16 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.51 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]