#2
⏱️ 276.97 мс
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:
["drinks",462,470,521,true,462,470,521]
#3
⏱️ 56.28 мс
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:
["drinks",462,470,521,true,462,470,521]
#4
⏱️ 2.54 мс
select * from "deals" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "is_active" = ? and "store_id" in (?, ?, ?)
Bindings:
[1432648,189826,162990,135634,134890,134426,134253,134161,134034,133973,132088,131290,131166,131057,129898,129744,129520,129023,129008,128543,128498,128283,128133,128082,126586,125909,125825,125413,125320,124962,124850,123982,true,462,470,521]
#6
⏱️ 3.61 мс
select * from "store_prices" where "master_product_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "price" > ? and "store_id" in (?, ?, ?)
Bindings:
[1432648,189826,162990,135634,134890,134426,134253,134161,134034,133973,132088,131290,131166,131057,129898,129744,129520,129023,129008,128543,128498,128283,128133,128082,126586,125909,125825,125413,125320,124962,124850,123982,0,462,470,521]