#1
⏱️ 159.46 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"kfar-saba"]
#2
⏱️ 929.22 мс
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:
["dairy","cheese",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
⏱️ 546.24 мс
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:
["dairy","cheese",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
⏱️ 12.55 мс
select * from "canonical_products" where "canonical_products"."id" in (155, 199)
#5
⏱️ 8.53 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[155,199]
#6
⏱️ 44.36 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,11135534,8314244,8314242,4279811,4157788,4105860,4085256,4033418,4019922,4003338,3987697,3985099,3974567,2802677,2679096,2668917,2668915,2611955,2611893,2611880,2611240,2611239,1431399,1297333,968724,967973,967971,934016,845059,830941,815896,4286085,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
⏱️ 6.31 мс
select * from "stores" where "stores"."id" in (141, 329, 354, 392)
#8
⏱️ 24.72 мс
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 4019922 WHEN sp.master_product_id = 4019922 THEN 4019922 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,11135534,8314244,8314242,4279811,4157788,4105860,4085256,4033418,4019922,4003338,3987697,3985099,3974567,2802677,2679096,2668917,2668915,2611955,2611893,2611880,2611240,2611239,1431399,1297333,968724,967973,967971,934016,845059,830941,815896,4286085,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
⏱️ 24.84 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[1228238,1228237,1228964,100063372,36360906,1188582,56502724,90122005,90682982,90682981,90682977,90680118,90682978,90682846,90682849,90674796,110744108,111734861,3572993,24792190,110744760,59750401,59750400,59750403,59779674,24500720,3413818,3427833,24493888,3428059,3427972,24491720,78866548,24502693,10832771,22341633]
#10
⏱️ 10.66 мс
select * from "stores" where "stores"."id" in (25, 141, 354, 368, 392, 478, 498, 556, 584)
#11
⏱️ 10.66 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["kfar-saba"]
#12
⏱️ 7.06 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 13.44 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]