#1
⏱️ 169.11 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"petah-tikva"]
#2
⏱️ 6613.54 мс
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:
["grocery","sauces_oils",18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391,true,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#3
⏱️ 601.21 мс
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:
["grocery","sauces_oils",18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391,true,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#4
⏱️ 1.49 мс
select * from "canonical_products" where "canonical_products"."id" in (242)
#5
⏱️ 0.73 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[242]
#6
⏱️ 20.84 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[112375610,75165094,66413048,39417299,34464787,34414162,30691571,30659127,27628022,25603232,8775770,8616048,8383672,7443308,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,4227275,4225373,4223065,4210061,4188323,4165706,4159848,4146399,1915185,true,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#7
⏱️ 2.13 мс
select * from "stores" where "stores"."id" in (104, 174, 190, 191, 216, 224, 257, 276, 732)
#8
⏱️ 11.44 мс
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 = 1915185 THEN 4227275 WHEN sp.master_product_id = 4227275 THEN 4227275 ELSE sp.master_product_id END limit 500
Bindings:
[112375610,75165094,66413048,39417299,34464787,34414162,30691571,30659127,27628022,25603232,8775770,8616048,8383672,7443308,4991028,4988808,4988696,4987860,4987789,4987622,4987621,4985212,4984746,4984221,4227275,4225373,4223065,4210061,4188323,4165706,4159848,4146399,1915185,0,18,152,216,732,750,771,103,1145,1211,1239,1246,1262,1306,1328,1334,174,224,448,484,503,504,505,1354,553,575,579,648,655,662,681,688,689,104,308,34,35,146,190,191,257,276,324,330,338,356,391]
#9
⏱️ 14.31 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[73306087,16306988,5349321,61966825,2527363,24756792,3546745,3549059,3550963,22580180,41899255,20113387,52415871,78284168,78287811,60393948,60392111,60423677,60395092,60392109,60422247,58290676,9604296,49139994,3126148,3126673,3127139,3129548,3129549,3129716,3129787,3130623,3130735,3132955,77075065]
#10
⏱️ 2.5 мс
select * from "stores" where "stores"."id" in (104, 276, 448, 484, 553, 575, 579, 732, 750, 771)
#11
⏱️ 2.05 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["petah-tikva"]
#12
⏱️ 1.48 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 2.22 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]