#1
⏱️ 224.26 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"modiin"]
#2
⏱️ 905.85 мс
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",713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#3
⏱️ 623.67 мс
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",713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#4
⏱️ 24.29 мс
select * from "canonical_products" where "canonical_products"."id" in (155)
#5
⏱️ 21.92 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[155]
#6
⏱️ 33.82 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[11135534,8314244,8314242,4990037,4988786,4987083,4986561,4985439,4985410,4286085,4279811,4213380,4105860,3985099,3974567,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611879,2611240,2611239,2611238,1454587,1453876,968724,967973,967972,967971,4157788,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#7
⏱️ 18.9 мс
select * from "stores" where "stores"."id" in (147, 406)
#8
⏱️ 32.64 мс
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 4286085 WHEN sp.master_product_id = 4157788 THEN 4286085 ELSE sp.master_product_id END limit 500
Bindings:
[11135534,8314244,8314242,4990037,4988786,4987083,4986561,4985439,4985410,4286085,4279811,4213380,4105860,3985099,3974567,2679096,2668917,2668915,2633414,2611955,2611893,2611880,2611879,2611240,2611239,2611238,1454587,1453876,968724,967973,967972,967971,4157788,0,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#9
⏱️ 63.03 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[35005611,1117474,1117475,1117476,1118229,36361001,29273552,1899421,1899419,1900092,1900091,1894431,1885865,29284119,1899415,1899118,10772556,10796665,10796664,10796663,10796659,10778485,10796660,29518623,10796653,10796655,2144495,3498551,3508747,24704716,111649019,20010844,111649131,39545361,22480910,12392058,12389650,12389651,12389649,12389648,12385952,12389647,12389640,2723471,12387419,12387448,12388571,12389094,12390799,12392052]
#10
⏱️ 9.82 мс
select * from "stores" where "stores"."id" in (147, 348, 406, 426, 439, 549, 713)
#11
⏱️ 11.4 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["modiin"]
#12
⏱️ 11.93 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 41.08 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]