#1
⏱️ 266.65 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#2
⏱️ 927.02 мс
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",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
⏱️ 637.52 мс
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",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
⏱️ 4.3 мс
select * from "canonical_products" where "canonical_products"."id" in (8, 284)
#5
⏱️ 3.15 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[284,8]
#6
⏱️ 170.23 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7529533,7504693,7499337,7065236,6745776,6730411,4987518,4536333,4225438,4215849,4089825,4089325,4075884,4061313,4038041,4036040,4018216,4017115,4006000,4002672,4002085,3997644,3990586,3985219,3980651,3980340,3973282,3972212,3041110,2674471,2645643,1462716,3170808,123050,160427,2812826,4315844,true,740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392]
#7
⏱️ 13.5 мс
select * from "stores" where "stores"."id" in (25, 141, 302, 392, 740)
#8
⏱️ 26.98 мс
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 = 1462716 THEN 3041110 WHEN sp.master_product_id = 3170808 THEN 3041110 WHEN sp.master_product_id = 123050 THEN 3041110 WHEN sp.master_product_id = 3041110 THEN 3041110 WHEN sp.master_product_id = 160427 THEN 3041110 WHEN sp.master_product_id = 2812826 THEN 3041110 WHEN sp.master_product_id = 4215849 THEN 4215849 WHEN sp.master_product_id = 4315844 THEN 4215849 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7529533,7504693,7499337,7065236,6745776,6730411,4987518,4536333,4225438,4215849,4089825,4089325,4075884,4061313,4038041,4036040,4018216,4017115,4006000,4002672,4002085,3997644,3990586,3985219,3980651,3980340,3973282,3972212,3041110,2674471,2645643,1462716,3170808,123050,160427,2812826,4315844,0,740,354,368,1124,1138,1226,1238,584,50,249,478,498,556,25,141,194,222,254,295,302,317,329,392]
#9
⏱️ 14.71 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[69793212,67781016,78882961,68475177,31656746,33770409,2514813,30209793,45104366,31661036,18963366,50492083,18962406,18962122,18964712,12215577,30342854,3574642,24800372,16269866,24793993,3574877,24804764,24794313,24794529,24804775,78377254,24794326,3420204,24495058,24497160,3421907,24521419,3427982,3413334,3421650,24531358,3427281,24498055,77955807,77957924,24496139,3413758,3414073,24533198,3413151,3413649,9603706,9593126]
#10
⏱️ 11.34 мс
select * from "stores" where "stores"."id" in (25, 141, 302, 392, 478, 498, 556, 584, 740)
#11
⏱️ 4.52 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kfar-saba"]
#12
⏱️ 6.69 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 10.13 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]