#1
⏱️ 37.18 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"akko"]
#2
⏱️ 85.24 мс
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",11,442,686,1368,221,true,11,442,686,1368,221]
#3
⏱️ 61.34 мс
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",11,442,686,1368,221,true,11,442,686,1368,221]
#4
⏱️ 1.73 мс
select * from "canonical_products" where "canonical_products"."id" in (196)
#5
⏱️ 0.79 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[196]
#6
⏱️ 4.54 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[63265682,3646080,3556383,3395115,2750558,2742017,2671000,2670972,2667237,281449,242656,208252,208251,207716,197740,182693,182692,180263,165452,165434,164977,164690,164651,161499,159361,159309,149801,135454,135452,135003,134463,133923,3702666,true,11,442,686,1368,221]
#7
⏱️ 1.64 мс
select * from "stores" where "stores"."id" in (11, 221, 1368)
#8
⏱️ 2.99 мс
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:
[63265682,3646080,3556383,3395115,2750558,2742017,2671000,2670972,2667237,281449,242656,208252,208251,207716,197740,182693,182692,180263,165452,165434,164977,164690,164651,161499,159361,159309,149801,135454,135452,135003,134463,133923,3702666,0,11,442,686,1368,221]
#9
⏱️ 12.28 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1587439,6227315,6234044,1587717,6238418,1587875,1587876,6769100,25395768,6106650,6106703,6107015,2191299,2187779,2192456,2191267,2186690,77854571,2185604,2187156,2181414,2187110,2191300,2193452,10868941,10868948,2194120,2185603,2192732,33344173,10884722,2181649,2181648,67834466,39073748]
#10
⏱️ 2.38 мс
select * from "stores" where "stores"."id" in (11, 221, 442)
#11
⏱️ 1.76 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["akko"]
#12
⏱️ 2.89 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.91 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]