#1
⏱️ 50.37 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#2
⏱️ 1374.09 мс
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","chocolate_candy",740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392,true,740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392]
#3
⏱️ 992.17 мс
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","chocolate_candy",740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392,true,740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392]
#4
⏱️ 14.11 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[117894874,117894862,74076446,72978997,57061517,55055286,54411455,42625503,42476629,38847180,32652869,27408007,26461181,13907417,13907412,12851980,12851979,12851978,12721528,12721432,12721431,12214467,8775717,8326860,7534382,7534355,7523804,7511974,7502589,7501600,7486017,7485890,true,740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392]
#5
⏱️ 1.29 мс
select * from "stores" where "stores"."id" in (740)
#6
⏱️ 15.24 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[117894874,117894862,74076446,72978997,57061517,55055286,54411455,42625503,42476629,38847180,32652869,27408007,26461181,13907417,13907412,12851980,12851979,12851978,12721528,12721432,12721431,12214467,8775717,8326860,7534382,7534355,7523804,7511974,7502589,7501600,7486017,7485890,0,740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392]
#7
⏱️ 2.65 мс
select * from "stores" where "stores"."id" in (478, 498, 556, 584, 740)
#8
⏱️ 5.17 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kfar-saba"]
#9
⏱️ 5.05 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 4.84 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]