#1
⏱️ 166.4 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"karmiel"]
#2
⏱️ 2727.06 мс
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",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#3
⏱️ 890.25 мс
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",186,743,119,1241,545,1325,98,450,684,29,398,true,186,743,119,1241,545,1325,98,450,684,29,398]
#4
⏱️ 12 мс
select * from "canonical_products" where "canonical_products"."id" in (199)
#5
⏱️ 5.76 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[199]
#6
⏱️ 20.67 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[81178120,36601256,12852012,12201255,8322706,8314244,8314242,6778985,5305199,4990849,4371453,4279811,4106826,4106825,4072560,4053310,4053285,4053284,4046164,4033550,4033418,4031000,4030503,4019922,4015669,4004085,3990950,3987697,3985099,3974567,3973613,3973147,4085256,true,186,743,119,1241,545,1325,98,450,684,29,398]
#7
⏱️ 9.06 мс
select * from "stores" where "stores"."id" in (29, 98, 119, 398, 743)
#8
⏱️ 24.06 мс
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:
[81178120,36601256,12852012,12201255,8322706,8314244,8314242,6778985,5305199,4990849,4371453,4279811,4106826,4106825,4072560,4053310,4053285,4053284,4046164,4033550,4033418,4031000,4030503,4019922,4015669,4004085,3990950,3987697,3985099,3974567,3973613,3973147,4085256,0,186,743,119,1241,545,1325,98,450,684,29,398]
#9
⏱️ 33.05 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[21198457,115087589,109881181,11140536,11114780,15826715,77864064,3360815,3362052,3377999,3358493,24401903,3379122,3357395,111513382,3376590,3377230,3357339,3357471,3370067,3377168,3377169,3377194,25038292,7487121,7487123,7504574,77889448,3374777,7550297,3362980,3362982,3371444,98742426,7552072,24424516,94171744,9570267]
#10
⏱️ 12.95 мс
select * from "stores" where "stores"."id" in (29, 398, 450, 545, 743)
#11
⏱️ 14.89 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["karmiel"]
#12
⏱️ 6.46 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 8.24 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]