#1
⏱️ 188.91 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ariel"]
#2
⏱️ 3820.07 мс
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:
["grocery",162,464,263,228,true,162,464,263,228]
#3
⏱️ 4036.5 мс
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:
["grocery",162,464,263,228,true,162,464,263,228]
#4
⏱️ 19.32 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 16.8 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 20.44 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[80426687,75165094,30691571,25603232,7065236,6745776,6730411,3879137,3877654,3838350,3739767,2995893,2991635,2953676,2953667,2842852,2811192,2807243,2752605,2717082,2717075,2717021,2702452,2702263,2702255,2701335,2681555,2680174,2674450,2674399,2671354,2671353,2672969,2672977,true,162,464,263,228]
#7
⏱️ 11.35 мс
select * from "stores" where "stores"."id" in (228, 263)
#8
⏱️ 11.82 мс
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 = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 ELSE sp.master_product_id END limit 500
Bindings:
[80426687,75165094,30691571,25603232,7065236,6745776,6730411,3879137,3877654,3838350,3739767,2995893,2991635,2953676,2953667,2842852,2811192,2807243,2752605,2717082,2717075,2717021,2702452,2702263,2702255,2701335,2681555,2680174,2674450,2674399,2671354,2671353,2672969,2672977,0,162,464,263,228]
#9
⏱️ 19.5 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[11655480,11655481,56437177,56437178,33595371,2430970,56429260,30016905,11660656,30021796,33585743,33586008,56432829,11645923,56437539,68236516,56438710,68241210,68244862,30012578,33589772,78322051,30015949,68241358,68244976,11645638,30023728,11658219,72136162]
#10
⏱️ 20.97 мс
select * from "stores" where "stores"."id" in (464)
#11
⏱️ 8.41 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ariel"]
#12
⏱️ 19.42 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.42 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]