#2
⏱️ 1023.52 мс
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:
["meat",744,107,26,475,669,183,true,744,107,26,475,669,183]
#3
⏱️ 324.57 мс
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:
["meat",744,107,26,475,669,183,true,744,107,26,475,669,183]
#4
⏱️ 11.04 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[7438688,2660937,1953093,1457053,1225428,409783,310280,242926,163808,163807,163802,155758,155596,132756,132366,132239,132182,132133,132132,131510,129664,129443,128891,128648,128646,128645,128644,128643,128609,128602,128592,128587,true,744,107,26,475,669,183]
#6
⏱️ 6.78 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?, ?, ?, ?)
Bindings:
[7438688,2660937,1953093,1457053,1225428,409783,310280,242926,163808,163807,163802,155758,155596,132756,132366,132239,132182,132133,132132,131510,129664,129443,128891,128648,128646,128645,128644,128643,128609,128602,128592,128587,0,744,107,26,475,669,183]