使用WITH子句更新语句 - 提高时间性能

时间:2016-10-26 09:08:24

标签: sql oracle common-table-expression

我有这个更新声明:

update crm_acct_inc_mass_bundles
set detinere_pachet='0'
where account in (select account_id 
      from( 
          select account_id, count(distinct product_type_subtype_id) 
          from  dwh_col.co_tran_account_lcl@gdwh24_dwh_col 
          where date_from between '01-oct-2016' and '20-oct-2016'
          group by account_id
          having count(distinct product_type_subtype_id)>1));

有没有办法使用WITH子句改善此语句的时间性能?

0 个答案:

没有答案