#1
⏱️ 135.88 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#2
⏱️ 2580.12 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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:
["dairy",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
⏱️ 1457.28 мс
select * from "master_products" where "barcode" is not null and "category_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:
["dairy",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
⏱️ 13.12 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 9.7 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 24.89 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,32387955,12852012,12201255,11135534,8314242,7443254,7438743,7432285,6778985,5305199,4990849,4424496,4371453,4279811,4209891,4106826,4106825,4105860,4085256,4072560,4060930,4053310,4053285,4053284,4033550,4033418,4031000,4030503,4019922,4015669,4009223,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
⏱️ 12.84 мс
select * from "stores" where "stores"."id" in (141, 317, 329, 354, 368, 392, 740)
#8
⏱️ 16.83 мс
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 = 4085256 THEN 4019922 WHEN sp.master_product_id = 4019922 THEN 4019922 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,32387955,12852012,12201255,11135534,8314242,7443254,7438743,7432285,6778985,5305199,4990849,4424496,4371453,4279811,4209891,4106826,4106825,4105860,4085256,4072560,4060930,4053310,4053285,4053284,4033550,4033418,4031000,4030503,4019922,4015669,4009223,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
⏱️ 33.73 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[13051011,36360906,6541570,33774318,12030918,12034299,2516678,2516454,35891585,12211054,12210940,78378755,3572993,24804305,78389670,24804653,59773732,24792190,24804655,59750401,24803119,24803569,59750400,59782908,59777514,59779674,77966274,15814946,3427972,3426595,3427135,24491720,3410213,3427086,24532761,24532811,78869256,78878480,78866548,24492940,24492942,24502693,77982193,78879680,10863378,10864931,10832771,68245445,24529485,18037485,9570264]
#10
⏱️ 8.27 мс
select * from "stores" where "stores"."id" in (141, 354, 392, 478, 498, 556, 584, 740)
#11
⏱️ 11.49 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kfar-saba"]
#12
⏱️ 12.74 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 14.96 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]