#1
⏱️ 103.86 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"modiin"]
#2
⏱️ 5097.62 мс
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:
["household",713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#3
⏱️ 861.62 мс
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:
["household",713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#4
⏱️ 1.69 мс
select * from "canonical_products" where "canonical_products"."id" in (12)
#5
⏱️ 0.93 мс
select "id", "canonical_product_id" from "master_products" where "canonical_product_id" in (?)
Bindings:
[12]
#6
⏱️ 12.84 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[4990823,4990804,4990789,4988774,4987229,4985175,4966676,4762323,4672284,4662273,4562376,4540379,4532830,4531886,4531885,4524057,4178083,4097001,4086823,4079136,4025282,4003068,3996093,3987329,3983369,3974210,3971186,3411661,3340041,2987725,2987724,2807242,2956794,true,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#7
⏱️ 5.85 мс
select * from "stores" where "stores"."id" in (1153, 1201, 1255, 1273)
#8
⏱️ 5.49 мс
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 = 2956794 THEN 3411661 WHEN sp.master_product_id = 3411661 THEN 3411661 ELSE sp.master_product_id END limit 500
Bindings:
[4990823,4990804,4990789,4988774,4987229,4985175,4966676,4762323,4672284,4662273,4562376,4540379,4532830,4531886,4531885,4524057,4178083,4097001,4086823,4079136,4025282,4003068,3996093,3987329,3983369,3974210,3971186,3411661,3340041,2987725,2987724,2807242,2956794,0,713,763,111,345,1153,1201,1255,1273,40,426,439,549,406,147,305,348]
#9
⏱️ 17.63 мс
select * from "store_prices" where "id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[10410193,10407593,10407594,2146616,10796056,77763688,3497161,54568552,24711383,24704971,3502812,24712297,78195145,3498244,62449985,78195149,3501776,12386819,3091470,2730886,2730887,2731825,7604989,11857153,12392893,11857155,12392846,3093535,12387184,12389240,12390787,12392806,12392821,12392840]
#10
⏱️ 3.91 мс
select * from "stores" where "stores"."id" in (426, 439, 549, 713)
#11
⏱️ 1.55 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["modiin"]
#12
⏱️ 3.64 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#13
⏱️ 5.15 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]