#1
⏱️ 55.5 мс
select "id" from "stores" where "is_active" = ? and "city_slug" = ?
Bindings:
[true,"rehovot"]
#2
⏱️ 1528.25 мс
select count(*) as "aggregate" from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_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","cleaning_paper",1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390,true,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#3
⏱️ 681.37 мс
select * from "master_products" where "barcode" is not null and "category_slug" = ? and "subcategory_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","cleaning_paper",1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390,true,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#4
⏱️ 11.15 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[56108688,10880869,4990823,4990804,4990789,4988774,4987229,4978641,4978640,4978579,4799728,4762323,4672284,4662273,4617736,4609553,4578361,4562376,4562370,4533540,4533538,4532830,4531886,4531885,4524057,4283415,4197755,4196842,4079136,4054016,4045906,4037621,true,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#5
⏱️ 2.26 мс
select * from "stores" where "stores"."id" in (215, 1120, 1218, 1282, 1298, 1350, 1402)
#6
⏱️ 9.41 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings:
[56108688,10880869,4990823,4990804,4990789,4988774,4987229,4978641,4978640,4978579,4799728,4762323,4672284,4662273,4617736,4609553,4578361,4562376,4562370,4533540,4533538,4532830,4531886,4531885,4524057,4283415,4197755,4196842,4079136,4054016,4045906,4037621,0,1120,215,764,768,335,371,1218,1282,597,1298,47,60,1350,455,550,620,1402,20,81,134,139,173,349,390]
#7
⏱️ 1.67 мс
select * from "stores" where "stores"."id" in (550, 597, 620, 768)
#8
⏱️ 1.93 мс
select * from "locations" where "city_slug" = ? limit 1
Bindings:
["rehovot"]
#9
⏱️ 1.93 мс
select * from "locations" where "is_popular" = ? order by "sort_order" asc
Bindings:
[true]
#10
⏱️ 2.06 мс
select * from "locations" where "is_active" = ? order by "is_popular" desc, "sort_order" asc
Bindings:
[true]