#1
⏱️ 270.73 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"yavne"]
#2
⏱️ 1492.14 мс
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",161,667,17,82,true,161,667,17,82]
#3
⏱️ 337.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:
["grocery","canned_preserves",161,667,17,82,true,161,667,17,82]
#4
⏱️ 7.39 мс
select * from "canonical_products" where "canonical_products"."id" in (242)
#5
⏱️ 10.15 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[242]
#6
⏱️ 19.41 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[1918287,1915186,1915185,1912286,1912018,1911972,1910474,1908144,1453961,1453960,1452339,1452328,506053,193602,135279,135278,132282,132281,127296,115193,113169,112881,112469,109476,109175,109157,107426,106703,106697,105675,105673,105671,4227275,true,161,667,17,82]
#7
⏱️ 13.9 мс
select * from "stores" where "stores"."id" in (17, 82)
#8
⏱️ 17.23 мс
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 = 1915185 THEN 1915185 WHEN sp.master_product_id = 4227275 THEN 1915185 ELSE sp.master_product_id END limit 500
Bindings:
[1918287,1915186,1915185,1912286,1912018,1911972,1910474,1908144,1453961,1453960,1452339,1452328,506053,193602,135279,135278,132282,132281,127296,115193,113169,112881,112469,109476,109175,109157,107426,106703,106697,105675,105673,105671,4227275,0,161,667,17,82]
#9
⏱️ 19.26 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6100987,6100988,6100989,6106136,6106142,6108458,14990262,6112082,6098199,14991059,4840115,4840140,4840396,4843403,4843404,4843494,4843250,4843251,4843362,4843364,4843046,85128331,4837351,4840151,4840155,4840152,4846878,4851857,4851923,4852145,4843157,4851741]
#10
⏱️ 16.53 мс
select * from "stores" where "stores"."id" in (17, 82)
#11
⏱️ 7.24 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["yavne"]
#12
⏱️ 8.73 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.76 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]