#1
⏱️ 71.75 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ashkelon"]
#2
⏱️ 890.44 мс
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",737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#3
⏱️ 314.77 мс
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",737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#4
⏱️ 1.71 мс
select * from "canonical_products" where "canonical_products"."id" in (57, 166)
#5
⏱️ 0.81 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[57,166]
#6
⏱️ 202.43 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12196449,12196440,4415637,4060426,4032627,4031498,4030805,4015425,4002769,3991036,3986018,3984999,3973055,3971747,2975340,2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1472108,1472107,1469150,1457784,1455751,1455745,1455741,1451848,4148882,2261290,162805,4041677,154967,162154,3253825,162814,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#7
⏱️ 2.28 мс
select * from "stores" where "stores"."id" in (182, 247)
#8
⏱️ 12.45 мс
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,4060426,4032627,4031498,4030805,4015425,4002769,3991036,3986018,3984999,3973055,3971747,2975340,2842852,2702452,2680174,2670979,2666027,2663549,2640775,2640774,2608194,1472108,1472107,1469150,1457784,1455751,1455745,1455741,1451848,4148882,2261290,162805,4041677,154967,162154,3253825,162814,0,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#9
⏱️ 12.15 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4720372,4720373,5589049,5589050,33636195,33626245,33626249,11746492,30089822,2464244,11766337,11749572,2464038,11743621,11744684,31509409,11756983,11742111,30084046,33619460,31720340,3809324,24364564,3822777,3356460,3810865,3355161,3339383,3354737,3355428,3356550,3810374,3344160,37244384,26700086]
#10
⏱️ 1.2 мс
select * from "stores" where "stores"."id" in (182, 247, 467, 489, 544)
#11
⏱️ 1.47 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ashkelon"]
#12
⏱️ 1.51 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 1.55 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]