#1
⏱️ 107.69 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"akko"]
#2
⏱️ 313.66 мс
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","canned_preserves",11,442,686,1368,221,true,11,442,686,1368,221]
#3
⏱️ 170.79 мс
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","canned_preserves",11,442,686,1368,221,true,11,442,686,1368,221]
#4
⏱️ 4.25 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 5.21 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 15.58 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?)
Bindings:
[7065236,6745776,6730411,4536333,3739767,2864978,2717082,2717075,2717021,2681555,2674471,2671354,2659225,2645643,1459891,1453881,1434518,615729,452321,193602,169861,156620,154703,150988,149207,149206,135279,135278,134634,133990,133639,133426,2672969,2672977,true,11,442,686,1368,221]
#7
⏱️ 1.97 мс
select * from "stores" where "stores"."id" in (11)
#8
⏱️ 4.48 мс
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 = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 ELSE sp.master_product_id END limit 500
Bindings:
[7065236,6745776,6730411,4536333,3739767,2864978,2717082,2717075,2717021,2681555,2674471,2671354,2659225,2645643,1459891,1453881,1434518,615729,452321,193602,169861,156620,154703,150988,149207,149206,135279,135278,134634,133990,133639,133426,2672969,2672977,0,11,442,686,1368,221]
#9
⏱️ 18.75 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67325036,67325035,2181714,2186033,2182888,2190038,2186183,2186184,10896779,71626357,2185553,2183644,31207425,29564184,2195051,10867760,10870266,2182010,29557676,10879362,10866133,2190184,2193467,29559165,33336915,10870207,10870317,31208324,29570718,10866245,10867726,10867602]
#10
⏱️ 5.57 мс
select * from "stores" where "stores"."id" in (11, 442)
#11
⏱️ 3.43 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["akko"]
#12
⏱️ 8.64 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 5.36 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]