#1
⏱️ 95.26 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ariel"]
#2
⏱️ 1537.37 мс
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","sauces_oils",162,464,263,228,true,162,464,263,228]
#3
⏱️ 486.76 мс
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","sauces_oils",162,464,263,228,true,162,464,263,228]
#4
⏱️ 8.59 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 4.34 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 35.45 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[80426687,75165094,30691571,25603232,2991635,2953667,2811192,2807243,2752605,2702263,2671353,2669776,2658241,2632495,2631542,1546573,1507326,1486122,1476791,1476182,1475502,1474522,1474452,1458529,1458528,1458526,1456529,1451634,1438422,1437983,1435632,1434614,98914,true,162,464,263,228]
#7
⏱️ 11.55 мс
select * from "stores" where "stores"."id" in (228, 263)
#8
⏱️ 15.98 мс
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 = 98914 THEN 1458529 WHEN sp.master_product_id = 1458529 THEN 1458529 ELSE sp.master_product_id END limit 500
Bindings:
[80426687,75165094,30691571,25603232,2991635,2953667,2811192,2807243,2752605,2702263,2671353,2669776,2658241,2632495,2631542,1546573,1507326,1486122,1476791,1476182,1475502,1474522,1474452,1458529,1458528,1458526,1456529,1451634,1438422,1437983,1435632,1434614,98914,0,162,464,263,228]
#9
⏱️ 27.41 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5962320,5942657,5954057,5956236,5959112,5960350,5940019,5942746,5962197,5022803,5019373,5019746,800474,5008716,5011495,5011508,33594086,33586992,33584069,33584127,2432992,33595031,11655355,2434164,2429708,11655480,11660656,11645923,56437539,68236516,68241210,30012578,72136162]
#10
⏱️ 8.88 мс
select * from "stores" where "stores"."id" in (228, 263, 464)
#11
⏱️ 8.02 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ariel"]
#12
⏱️ 8.75 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 9.54 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]