#1
⏱️ 117.56 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rehovot"]
#2
⏱️ 527.86 мс
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:
["snacks","chips_savory",1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173,true,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#3
⏱️ 212.72 мс
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:
["snacks","chips_savory",1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173,true,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#4
⏱️ 8.26 мс
select * from "canonical_products" where "canonical_products"."id" in (224)
#5
⏱️ 6.37 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[224]
#6
⏱️ 294.22 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4984771,3711116,810310,692746,281449,264842,242656,208252,208251,200515,200509,200508,200507,200506,200505,200504,200503,200501,200500,200499,200496,200495,200494,200493,200488,200487,200486,200485,200484,200483,200482,200481,1453483,true,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#7
⏱️ 3.12 мс
select * from "stores" where "stores"."id" in (20, 81, 134, 139, 173, 335, 349, 371, 390, 597)
#8
⏱️ 7.53 мс
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 = 3711116 THEN 3711116 WHEN sp.master_product_id = 1453483 THEN 3711116 ELSE sp.master_product_id END limit 500
Bindings:
[4984771,3711116,810310,692746,281449,264842,242656,208252,208251,200515,200509,200508,200507,200506,200505,200504,200503,200501,200500,200499,200496,200495,200494,200493,200488,200487,200486,200485,200484,200483,200482,200481,1453483,0,1120,764,768,335,1218,1282,597,1298,349,371,390,20,47,60,81,139,215,1350,455,550,620,1402,134,173]
#9
⏱️ 18.6 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6006668,6016458,4869361,4865762,5939104,5948774,5939105,5662767,4887472,4887473,4493189,1125251,5299249,1210933,1213031,1210934,5999708,1347854,1350079,1347855,1344311,2328085,2328110,2325877,2812893,2812894,2812895,2812896,2812897,2812898,2812899,2812904,2812905,2812906,2812907,2812909,2812910,2812911,2812913,2812914,2812915,2812916,2812917,2812918,2812924,2809589,2809590,3149307,3006445,3006446,3006447,3006448,3006449,3006450,3006455,3006456,3006457,3006458,3006459,3006460,3006461,3006463,3006464,3006465,3006466,3006467,3006468,3006472,3003373,3003374,2714851,2714852,2714853,2714854,2714855,2714856,2714857,2714858,2714864,2714865,2714866,2714867,2714869,2714870,2714871,2714872,2714873,2714874,2714875,293486,2714876,2714877,2714883,2710886,2710887,216119]
#10
⏱️ 7.06 мс
select * from "stores" where "stores"."id" in (20, 81, 134, 139, 173, 335, 349, 371, 390, 455, 597, 620, 768)
#11
⏱️ 5.86 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rehovot"]
#12
⏱️ 5.84 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.39 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]