#1
⏱️ 193.8 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"givatayim"]
#2
⏱️ 5608.71 мс
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",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#3
⏱️ 2062.17 мс
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",223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#4
⏱️ 13.32 мс
select * from "canonical_products" where "canonical_products"."id" in (155, 199)
#5
⏱️ 8.15 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?, ?)
Bindings:
[155,199]
#6
⏱️ 32.52 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[32387955,24338782,12852012,12201255,11135534,8322706,8314244,8314242,7471450,7443254,7432285,6778985,5305199,4990037,4908670,4286085,4279811,4157788,4085256,4072560,4053285,4053284,4033550,4031000,4030503,4019922,4015669,4009223,4008548,4004085,3985099,3974567,true,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#7
⏱️ 13.1 мс
select * from "stores" where "stores"."id" in (4, 14, 16, 32, 73, 118)
#8
⏱️ 43.83 мс
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 = 4286085 THEN 4157788 WHEN sp.master_product_id = 4157788 THEN 4157788 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:
[32387955,24338782,12852012,12201255,11135534,8322706,8314244,8314242,7471450,7443254,7432285,6778985,5305199,4990037,4908670,4286085,4279811,4157788,4085256,4072560,4053285,4053284,4033550,4031000,4030503,4019922,4015669,4009223,4008548,4004085,3985099,3974567,0,223,1118,1181,1221,1290,14,38,261,226,292,431,454,458,492,493,567,663,672,683,687,4,16,32,73,118,212,231]
#9
⏱️ 55.12 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[21364227,27550118,15007300,14995347,98081865,19724999,12668788,15829238,33180782,10553592,10555727,67674507,13639347,11248096,52166274,13796235,11412706,29865829,30301527,12153994,31746223,2556200,90507527,2555927,12151023,12157475,31755017,12162917,30317851,90541380,12169687,60097971,60131024,60133032,78510089,98416768,60090717,37809745,60127758,60128986,60090770,60128864,111080765,78515352,24855214,24855189,24858813,60125788,60100340,60100343,16376270,111083131,60126550,60125814]
#10
⏱️ 11.98 мс
select * from "stores" where "stores"."id" in (4, 14, 16, 32, 118, 431, 454, 458, 492, 493, 567)
#11
⏱️ 14.04 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["givatayim"]
#12
⏱️ 25.02 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 22.42 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]