#1
⏱️ 116 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"hadera"]
#2
⏱️ 1894.31 мс
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",738,469,155,342,true,738,469,155,342]
#3
⏱️ 957.69 мс
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",738,469,155,342,true,738,469,155,342]
#4
⏱️ 17.94 мс
select * from "canonical_products" where "canonical_products"."id" in (264)
#5
⏱️ 9.48 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[264]
#6
⏱️ 24.81 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[75165094,8775770,3931378,2953667,2811192,2807243,2752605,2671353,2669776,2658241,2632495,2631542,1462617,1458529,1458528,1458526,1456529,825495,498260,440827,364088,287759,277237,264080,257318,191910,189360,179119,176189,173524,170547,170351,98914,true,738,469,155,342]
#7
⏱️ 14.55 мс
select * from "stores" where "stores"."id" in (342, 738)
#8
⏱️ 14.14 мс
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:
[75165094,8775770,3931378,2953667,2811192,2807243,2752605,2671353,2669776,2658241,2632495,2631542,1462617,1458529,1458528,1458526,1456529,825495,498260,440827,364088,287759,277237,264080,257318,191910,189360,179119,176189,173524,170547,170351,98914,0,738,469,155,342]
#9
⏱️ 29.33 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5421154,5421430,5430044,5430226,5430227,5435207,1842086,1832985,29223694,10345294,1841249,10355792,1834244,1836199,1841299,10343152,10343290,1842595,1834731,1836453,10350875,1844049,1836151,1840990,1842625,10343027,1838415,30883126,55850207,9558325,3854041,9558992,9604302]
#10
⏱️ 6.53 мс
select * from "stores" where "stores"."id" in (342, 469, 738)
#11
⏱️ 10.16 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["hadera"]
#12
⏱️ 15.4 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.44 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]