#1
⏱️ 157.24 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"ashkelon"]
#2
⏱️ 2907.85 мс
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:
["dairy",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
⏱️ 1748.85 мс
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:
["dairy",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
⏱️ 20.12 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 10.62 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 31.47 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[36601256,12852012,12201255,11135534,8314242,7443254,6778985,5305199,4990849,4990037,4424496,4415681,4371453,4279811,4106825,4105860,4072560,4060930,4053310,4053285,4053284,4032127,4031000,4030503,4019922,4015669,4009223,4003338,3985099,3974567,3973613,3970617,4085256,true,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#7
⏱️ 11.07 мс
select * from "stores" where "stores"."id" in (37, 122, 131, 169, 303, 405, 737)
#8
⏱️ 25.42 мс
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 = 4085256 THEN 4019922 WHEN sp.master_product_id = 4019922 THEN 4019922 ELSE sp.master_product_id END limit 500
Bindings:
[36601256,12852012,12201255,11135534,8314242,7443254,6778985,5305199,4990849,4990037,4424496,4415681,4371453,4279811,4106825,4105860,4072560,4060930,4053310,4053285,4053284,4032127,4031000,4030503,4019922,4015669,4009223,4003338,3985099,3974567,3973613,3970617,4085256,0,737,765,1394,1125,1159,1175,1192,544,1317,168,467,489,1361,37,122,131,169,182,247,303,352,405]
#9
⏱️ 37.44 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[12638533,81563479,15970794,36360960,27060089,36361006,18453129,11753829,56468570,31708551,56578735,12116744,2543745,24360145,24366118,3342960,3355519,3355705,3347216,3339625,3343871,3354437,3354931,3356051,3822250,25023586,3822273,62987914,23140245,3808160,50913101,26687739,49832948,3811762,3821174,3353080,42775221,26687738,73643120,77850877,80252106,9570261]
#10
⏱️ 11.49 мс
select * from "stores" where "stores"."id" in (37, 169, 303, 405, 467, 489, 544, 737)
#11
⏱️ 10.88 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["ashkelon"]
#12
⏱️ 17.06 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 11.18 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]