#1
⏱️ 151.42 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"yavne"]
#2
⏱️ 1139.06 мс
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","baking_spices",161,667,17,82,true,161,667,17,82]
#3
⏱️ 443.63 мс
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","baking_spices",161,667,17,82,true,161,667,17,82]
#4
⏱️ 16.52 мс
select * from "canonical_products" where "canonical_products"."id" in (225)
#5
⏱️ 16.99 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[225]
#6
⏱️ 39.07 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?)
Bindings:
[1460855,1457784,1455751,1455745,1455741,1455708,1455705,1455698,1455697,1451739,364789,256300,206567,161332,160615,158192,155100,135564,134966,133204,132009,131476,130832,127942,114016,112045,110634,110156,109958,109190,108607,108606,100585,97793,true,161,667,17,82]
#7
⏱️ 16.97 мс
select * from "stores" where "stores"."id" in (17, 82)
#8
⏱️ 23.94 мс
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 = 1455697 THEN 1455697 WHEN sp.master_product_id = 100585 THEN 1455697 WHEN sp.master_product_id = 97793 THEN 1455697 ELSE sp.master_product_id END limit 500
Bindings:
[1460855,1457784,1455751,1455745,1455741,1455708,1455705,1455698,1455697,1451739,364789,256300,206567,161332,160615,158192,155100,135564,134966,133204,132009,131476,130832,127942,114016,112045,110634,110156,109958,109190,108607,108606,100585,97793,0,161,667,17,82]
#9
⏱️ 37.01 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6112093,6112094,6098634,6103191,6100783,6103536,6100981,6090952,73539102,6096088,6098486,6098635,6098609,6098337,4840168,4843166,4837687,4846580,4846911,4846919,4837698,4837469,4846360,4846325,4837241,4843113,4843114,4843116,4843119,4843132,4843136,4846335,4852907]
#10
⏱️ 13.89 мс
select * from "stores" where "stores"."id" in (17, 82)
#11
⏱️ 13.01 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["yavne"]
#12
⏱️ 18.46 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 17.56 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]