#2
⏱️ 555.91 мс
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:
["pharmacy",125,452,true,125,452]
#3
⏱️ 373.49 мс
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:
["pharmacy",125,452,true,125,452]
#4
⏱️ 27.72 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?)
Bindings:
[855581,703264,539618,258462,250602,248419,206189,200214,190027,190019,184122,171349,170043,169373,165915,164730,164729,164725,164724,164723,164381,161698,161695,150097,150087,150064,135519,135494,135203,135038,134567,134261,true,125,452]
#6
⏱️ 17.09 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?)
Bindings:
[855581,703264,539618,258462,250602,248419,206189,200214,190027,190019,184122,171349,170043,169373,165915,164730,164729,164725,164724,164723,164381,161698,161695,150097,150087,150064,135519,135494,135203,135038,134567,134261,0,125,452]