#1
⏱️ 128.44 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ramat-gan"]
#2
⏱️ 828.45 мс
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",1109,30,760,264,108,1146,557,608,1283,1287,1288,1300,1339,1,367,41,53,54,301,539,555,580,679,1398,76,235,284,296,340,326,384,true,1109,30,760,264,108,1146,557,608,1283,1287,1288,1300,1339,1,367,41,53,54,301,539,555,580,679,1398,76,235,284,296,340,326,384]
#3
⏱️ 544.54 мс
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",1109,30,760,264,108,1146,557,608,1283,1287,1288,1300,1339,1,367,41,53,54,301,539,555,580,679,1398,76,235,284,296,340,326,384,true,1109,30,760,264,108,1146,557,608,1283,1287,1288,1300,1339,1,367,41,53,54,301,539,555,580,679,1398,76,235,284,296,340,326,384]
#4
⏱️ 11.49 мс
select * from "canonical_products" where "canonical_products"."id" in (155, 199)
#5
⏱️ 13.01 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[155,199]
#6
⏱️ 26.43 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,11135534,8314242,4990037,4988786,4987083,4986561,4985410,4286085,4279811,4213380,4157788,4105860,4085256,4019922,4008548,3987697,3985099,3974567,2802677,2679096,2668915,2611955,2611893,2611879,2611240,2611239,2611238,1461488,1461487,1454587,1453876,true,1109,30,760,264,108,1146,557,608,1283,1287,1288,1300,1339,1,367,41,53,54,301,539,555,580,679,1398,76,235,284,296,340,326,384]
#7
⏱️ 9.03 мс
select * from "stores" where "stores"."id" in (76, 108, 284, 296, 367)
#8
⏱️ 27.46 мс
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,8314242,4990037,4988786,4987083,4986561,4985410,4286085,4279811,4213380,4157788,4105860,4085256,4019922,4008548,3987697,3985099,3974567,2802677,2679096,2668915,2611955,2611893,2611879,2611240,2611239,2611238,1461488,1461487,1454587,1453876,0,1109,30,760,264,108,1146,557,608,1283,1287,1288,1300,1339,1,367,41,53,54,301,539,555,580,679,1398,76,235,284,296,340,326,384]
#9
⏱️ 28.34 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4461483,4484599,4484600,35602418,5513600,5539207,5539208,36360974,36360794,78346797,68566522,24780061,78365639,24782180,24782471,3384875,3384895,62247062,77893824,24438214,24435164,24435163,68187558,3710792,24941317,78686700,18886604,37994053,3192117,3189711,3189712,3189710,3189709,3186024,3189708,3189703,2857994,7868805,3187484,3188635,3189157,3190860,3192111]
#10
⏱️ 8.56 мс
select * from "stores" where "stores"."id" in (76, 108, 284, 296, 367, 555, 557, 580, 608)
#11
⏱️ 8.29 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ramat-gan"]
#12
⏱️ 8.61 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 15.61 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]