#1
⏱️ 36.47 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"haifa"]
#2
⏱️ 296.8 мс
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","baking_spices",13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331,true,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#3
⏱️ 256.14 мс
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","baking_spices",13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331,true,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#4
⏱️ 1.18 мс
select * from "canonical_products" where "canonical_products"."id" in (57, 166)
#5
⏱️ 0.64 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[57,166]
#6
⏱️ 156.76 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,12196440,4415637,4399619,4174891,4060426,4053353,4034589,4032627,4030805,4015425,4002769,3991834,3991036,3986018,3984999,3973055,3971747,3246016,3230535,2975340,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1908616,4148882,2261290,162805,4041677,154967,162154,3253825,162814,true,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#7
⏱️ 3.98 мс
select * from "stores" where "stores"."id" in (72, 74)
#8
⏱️ 23.38 мс
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 = 4148882 THEN 4415637 WHEN sp.master_product_id = 2261290 THEN 4415637 WHEN sp.master_product_id = 162805 THEN 4415637 WHEN sp.master_product_id = 4041677 THEN 4415637 WHEN sp.master_product_id = 4415637 THEN 4415637 WHEN sp.master_product_id = 154967 THEN 4415637 WHEN sp.master_product_id = 162154 THEN 4415637 WHEN sp.master_product_id = 3253825 THEN 4415637 WHEN sp.master_product_id = 162814 THEN 4015425 WHEN sp.master_product_id = 4015425 THEN 4015425 ELSE sp.master_product_id END limit 500
Bindings:
[12196449,12196440,4415637,4399619,4174891,4060426,4053353,4034589,4032627,4030805,4015425,4002769,3991834,3991036,3986018,3984999,3973055,3971747,3246016,3230535,2975340,2842852,2702452,2680174,2670979,2666098,2666027,2663549,2640775,2640774,2608194,1908616,4148882,2261290,162805,4041677,154967,162154,3253825,162814,0,13,1111,707,202,716,734,721,102,220,309,323,1140,1156,1207,1244,1275,583,1291,1292,657,1345,9,8,49,52,57,61,62,67,72,422,434,468,472,474,1356,558,658,671,1369,1388,366,12,15,28,701,74,89,137,211,233,319,331]
#9
⏱️ 5.44 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4594728,4527551,1948318,1948842,1947677,1952464,10464329,1952568,1946184,29333855,1944342,2076629,2072109,10633482,10645927,10649850,29454152,33228235,10642349,31095459,2072203,10638372,29454325,31096019,31520265,2471979,11786614,11809191,11809206,11809230,11804871,11777949,11809311,56478802,11899925,35656648,2485642,11892191,31573216,11951046,11969242,11950706,11953915,3577402,78419360,3579744,78397413,3579624,59825295,78419287,25056867,25070430,25071511,25058440,24486525,3406521,24485602,24489425,25057933,3406291,24486439,3312091,78775414,3793813,3328152,7372708,3315819,3326714,3322239,78793669,24275073,3793323,78777404,78773350,3321716,24311753,19801430]
#10
⏱️ 3.1 мс
select * from "stores" where "stores"."id" in (72, 74, 422, 434, 468, 472, 474, 558, 583, 707)
#11
⏱️ 6.47 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["haifa"]
#12
⏱️ 4.32 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.14 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]