#1
⏱️ 205.22 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"beer-sheva"]
#2
⏱️ 103.86 мс
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:
["appliances","kitchen_appliances",736,754,776,132,172,246,1169,1170,1206,1249,1271,1274,1279,1299,1307,369,44,93,113,120,160,151,164,165,181,271,441,465,473,490,1370,1400,350,true,736,754,776,132,172,246,1169,1170,1206,1249,1271,1274,1279,1299,1307,369,44,93,113,120,160,151,164,165,181,271,441,465,473,490,1370,1400,350]
#3
⏱️ 46.67 мс
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:
["appliances","kitchen_appliances",736,754,776,132,172,246,1169,1170,1206,1249,1271,1274,1279,1299,1307,369,44,93,113,120,160,151,164,165,181,271,441,465,473,490,1370,1400,350,true,736,754,776,132,172,246,1169,1170,1206,1249,1271,1274,1279,1299,1307,369,44,93,113,120,160,151,164,165,181,271,441,465,473,490,1370,1400,350]
#4
⏱️ 19.78 мс
select * from "canonical_products" where "canonical_products"."id" in (25)
#5
⏱️ 9.69 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[25]
#6
⏱️ 301.44 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[3875956,3875872,2707089,2702790,2670268,2657025,2641224,2636108,101406,8775747,7443046,3877277,3539831,3454448,2845428,2840407,2836193,2835864,2810257,2810231,2744913,2716505,2706690,2705315,2684675,2677301,2676655,2676409,2675174,2673298,2662706,2662692,2657391,2676233,2702341,true,736,754,776,132,172,246,1169,1170,1206,1249,1271,1274,1279,1299,1307,369,44,93,113,120,160,151,164,165,181,271,441,465,473,490,1370,1400,350]
#7
⏱️ 19.3 мс
select * from "stores" where "stores"."id" in (93, 113, 120, 132, 151, 350, 369, 736)
#8
⏱️ 37.13 мс
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 = 2657391 THEN 2657025 WHEN sp.master_product_id = 2657025 THEN 2657025 WHEN sp.master_product_id = 2676233 THEN 2657025 WHEN sp.master_product_id = 2702341 THEN 2657025 ELSE sp.master_product_id END limit 500
Bindings:
[3875956,3875872,2707089,2702790,2670268,2657025,2641224,2636108,101406,8775747,7443046,3877277,3539831,3454448,2845428,2840407,2836193,2835864,2810257,2810231,2744913,2716505,2706690,2705315,2684675,2677301,2676655,2676409,2675174,2673298,2662706,2662692,2657391,2676233,2702341,0,736,754,776,132,172,246,1169,1170,1206,1249,1271,1274,1279,1299,1307,369,44,93,113,120,160,151,164,165,181,271,441,465,473,490,1370,1400,350]
#9
⏱️ 48.34 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[609324,5289390,2172277,2175561,2167584,2173902,2166754,2167541,2169205,2171194,2170445,2172703,2170888,2167851,2175911,2173050,2437665,2441664,2438872,2437194,2437642,2441636,2442193,2437491,2437872,2437383,2437418,2438374,2491784,4026340,1780536,1787645,1782025,1781683,1789355,1777481,1789776,1779895,1972811,1778080,1781162,1777854,1779981,1777896,1776963,1777044,1779952,1784617]
#10
⏱️ 6.88 мс
select * from "stores" where "stores"."id" in (246, 350, 441, 465, 473, 736, 754)
#11
⏱️ 19.25 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["beer-sheva"]
#12
⏱️ 8.13 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.65 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]