#1
⏱️ 27.67 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"nahariya"]
#2
⏱️ 2616.43 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_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",766,1123,1254,446,1362,10,241,410,true,766,1123,1254,446,1362,10,241,410]
#3
⏱️ 2169.26 мс
select * from "master_products" where "barcode" is not null and "category_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",766,1123,1254,446,1362,10,241,410,true,766,1123,1254,446,1362,10,241,410]
#4
⏱️ 1.81 мс
select * from "canonical_products" where "canonical_products"."id" in (38)
#5
⏱️ 0.81 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[38]
#6
⏱️ 6.64 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[75165094,30691571,25603232,8776026,7065236,6745776,6730411,4536333,4533815,3931378,3739767,3484014,2842852,2811192,2807243,2752605,2717082,2717075,2702452,2702263,2702255,2701335,2681555,2680174,2674471,2671354,2671353,2671017,2670979,2669776,2667577,2666098,2672969,2672977,true,766,1123,1254,446,1362,10,241,410]
#7
⏱️ 3.62 мс
select * from "stores" where "stores"."id" in (10, 241, 410)
#8
⏱️ 7.15 мс
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 = 2681555 THEN 2681555 WHEN sp.master_product_id = 2672969 THEN 2681555 WHEN sp.master_product_id = 2672977 THEN 2681555 ELSE sp.master_product_id END limit 500
Bindings:
[75165094,30691571,25603232,8776026,7065236,6745776,6730411,4536333,4533815,3931378,3739767,3484014,2842852,2811192,2807243,2752605,2717082,2717075,2702452,2702263,2702255,2701335,2681555,2680174,2674471,2671354,2671353,2671017,2670979,2669776,2667577,2666098,2672969,2672977,0,766,1123,1254,446,1362,10,241,410]
#9
⏱️ 14.15 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[6265187,928202,1508475,67671803,6509594,33381849,2230818,2237573,2226757,2226846,2229962,2230021,29624578,2234288,10993844,10979833,33374898,2225885,2226062,29606414,29606644,2236287,11008593,10979567,29608398,11001034,24391843,46780664,11012150,11023241,11014109,71688162]
#10
⏱️ 3.62 мс
select * from "stores" where "stores"."id" in (10, 241, 410, 446)
#11
⏱️ 3.5 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["nahariya"]
#12
⏱️ 3.12 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 3.32 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]