#1
⏱️ 143.17 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ariel"]
#2
⏱️ 468.98 мс
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:
["snacks","chips_savory",162,464,263,228,true,162,464,263,228]
#3
⏱️ 218.75 мс
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:
["snacks","chips_savory",162,464,263,228,true,162,464,263,228]
#4
⏱️ 3.75 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 8.31 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 15.13 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[32975885,32975875,32975867,32975846,3253804,2671000,2670972,2667237,1456789,1451696,362443,208252,208251,207716,197740,193506,189941,182693,182692,182094,165452,165434,164977,164690,164651,161499,159309,157151,155261,135452,135003,134463,3702666,true,162,464,263,228]
#7
⏱️ 4.29 мс
select * from "stores" where "stores"."id" in (228, 263)
#8
⏱️ 15.59 мс
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 = 3702666 THEN 2667237 WHEN sp.master_product_id = 2667237 THEN 2667237 ELSE sp.master_product_id END limit 500
Bindings:
[32975885,32975875,32975867,32975846,3253804,2671000,2670972,2667237,1456789,1451696,362443,208252,208251,207716,197740,193506,189941,182693,182692,182094,165452,165434,164977,164690,164651,161499,159309,157151,155261,135452,135003,134463,3702666,0,162,464,263,228]
#9
⏱️ 11.16 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[5949525,5952019,5952020,5014355,799622,800759,2429073,2436165,11638305,68256218,33588193,68236324,68240339,11635598,2434213,11637138,11631730,68238598,33586955,11637274,11637206,2428147,2428154,68254686,33594101,68247688,33594222,33594241,56438273,33589779,68237220,68237243,68237251,68237261]
#10
⏱️ 10.93 мс
select * from "stores" where "stores"."id" in (228, 263, 464)
#11
⏱️ 9.43 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ariel"]
#12
⏱️ 14.97 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.12 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]