#2
⏱️ 535.07 мс
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:
["pharmacy","personal_care",127,true,127]
#3
⏱️ 288.19 мс
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:
["pharmacy","personal_care",127,true,127]
#4
⏱️ 28.26 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?)
Bindings:
[703670,539618,297432,258462,252882,250602,249179,189889,182279,169076,169073,165915,165057,163579,162795,161698,161695,153676,153207,150567,150087,134259,133876,133311,133295,132793,132386,124139,123666,123016,122815,114826,true,127]
#6
⏱️ 18.42 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?)
Bindings:
[703670,539618,297432,258462,252882,250602,249179,189889,182279,169076,169073,165915,165057,163579,162795,161698,161695,153676,153207,150567,150087,134259,133876,133311,133295,132793,132386,124139,123666,123016,122815,114826,0,127]