#1
⏱️ 143.65 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#2
⏱️ 2587.86 мс
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
⏱️ 839.02 мс
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
⏱️ 7.41 мс
select * from "canonical_products" where "canonical_products"."id" in (155, 199)
#5
⏱️ 7.17 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[155,199]
#6
⏱️ 31.04 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,32387955,12852012,12201255,11135534,8322706,8314244,8314242,7547124,7443254,7438743,7432285,6778985,5305199,4990849,4989871,4424496,4415681,4371453,4279811,4209891,4157788,4106826,4106825,4105860,4085256,4072560,4060930,4053310,4053285,4053284,4033550,4286085,4019922,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
⏱️ 5.8 мс
select * from "stores" where "stores"."id" in (141, 317, 329, 354, 368, 392, 740)
#8
⏱️ 21.94 мс
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 = 4286085 THEN 4157788 WHEN sp.master_product_id = 4157788 THEN 4157788 WHEN sp.master_product_id = 4085256 THEN 4085256 WHEN sp.master_product_id = 4019922 THEN 4085256 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,32387955,12852012,12201255,11135534,8322706,8314244,8314242,7547124,7443254,7438743,7432285,6778985,5305199,4990849,4989871,4424496,4415681,4371453,4279811,4209891,4157788,4106826,4106825,4105860,4085256,4072560,4060930,4053310,4053285,4053284,4033550,4286085,4019922,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
⏱️ 40.23 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[100064368,13051011,36360906,6541570,33774318,12030918,90102060,12034299,2516678,2516454,35891585,12211054,12210940,104350489,111747370,110742967,24804653,59773732,3572993,24792190,110744760,24804655,59750401,110746279,111737515,111746352,111739469,24803119,24803569,59750400,59750403,59768497,59782908,59777514,59779674,3410213,3427086,24532761,24532811,78869256,78878480,3427972,78866548,24492940,24492942,24502693,77982193,78879680,10863378,10864931,10832771,22341633,24520691,68245445,24529485,18037485,9570264]
#10
⏱️ 11.18 мс
select * from "stores" where "stores"."id" in (141, 354, 392, 478, 498, 556, 584, 740)
#11
⏱️ 12.63 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kfar-saba"]
#12
⏱️ 15.01 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 12.45 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]