#1
⏱️ 131.38 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ariel"]
#2
⏱️ 445.89 мс
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:
["grocery","baking_spices",162,464,263,228,true,162,464,263,228]
#3
⏱️ 272.4 мс
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:
["grocery","baking_spices",162,464,263,228,true,162,464,263,228]
#4
⏱️ 14.85 мс
select * from "canonical_products" where "canonical_products"."id" in (6)
#5
⏱️ 4.5 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[6]
#6
⏱️ 13.77 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1474523,1472108,1472107,1457784,1455751,1451847,364789,256300,198874,195457,175170,175169,171783,168019,161333,161332,158192,155100,151280,135564,134616,134606,134507,1909143,true,162,464,263,228]
#7
⏱️ 3.5 мс
select * from "stores" where "stores"."id" in (228, 263)
#8
⏱️ 17.12 мс
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 = 1909143 THEN 198874 WHEN sp.master_product_id = 198874 THEN 198874 ELSE sp.master_product_id END limit 500
Bindings:
[2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1474523,1472108,1472107,1457784,1455751,1451847,364789,256300,198874,195457,175170,175169,171783,168019,161333,161332,158192,155100,151280,135564,134616,134606,134507,1909143,0,162,464,263,228]
#9
⏱️ 10.82 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5947011,5947012,5960353,799474,5014075,2427712,56431121,2436180,2436211,11655402,2433990,2431390,2431391,68246849,11644401,56429391,56434309,11656609,68243676,33587030,2431388,33594131,33586967,68248269,11637168,11659711,33588030,33594925,33594942,56438653,33595371,30021796,56438710]
#10
⏱️ 8.26 мс
select * from "stores" where "stores"."id" in (228, 263, 464)
#11
⏱️ 6.68 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ariel"]
#12
⏱️ 13.95 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.35 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]