#1
⏱️ 167.92 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"karmiel"]
#2
⏱️ 670.29 мс
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",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#3
⏱️ 563.42 мс
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",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#4
⏱️ 17.57 мс
select * from "canonical_products" where "canonical_products"."id" in (284)
#5
⏱️ 9.03 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[284]
#6
⏱️ 10.14 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[8775716,7065236,6745776,6730411,4987518,4536333,4402031,4315844,4193606,4075884,4061313,4038041,4036040,4018216,4006000,4002672,4002085,3997644,3990586,3988472,3985219,3980651,3980340,3973282,3972362,3972212,3971502,3971196,3739767,3646497,2717082,2717075,4215849,true,186,743,119,1241,545,1325,98,450,684,29,398]
#7
⏱️ 11.2 мс
select * from "stores" where "stores"."id" in (29, 98, 119, 398, 743)
#8
⏱️ 16.41 мс
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 = 4215849 THEN 4315844 WHEN sp.master_product_id = 4315844 THEN 4315844 ELSE sp.master_product_id END limit 500
Bindings:
[8775716,7065236,6745776,6730411,4987518,4536333,4402031,4315844,4193606,4075884,4061313,4038041,4036040,4018216,4006000,4002672,4002085,3997644,3990586,3988472,3985219,3980651,3980340,3973282,3972362,3972212,3971502,3971196,3739767,3646497,2717082,2717075,4215849,0,186,743,119,1241,545,1325,98,450,684,29,398]
#9
⏱️ 29.16 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[67324989,68662825,68242103,68124310,33419134,33419365,29689436,29700134,11113695,11114869,11114558,77860106,77860419,3359377,24397137,3360472,3371149,3371716,3378150,24396373,3361439,3370844,3376588,24425331,7497440,78824706,3359957,3361956,24402693,7556785,78830290,62176220,77868959,71806415,9603709,9593129]
#10
⏱️ 9.67 мс
select * from "stores" where "stores"."id" in (29, 98, 119, 398, 450, 545, 743)
#11
⏱️ 7.73 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["karmiel"]
#12
⏱️ 13.03 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.65 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]