Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Performance question - Updage with Correlated/Non Correleated Sub Query
kdc wrote:
>
> Any whay of predicting which will perform better
>
> update table1
> set column_name = 'New Value'
> where
> exists (select pk from table2 where table1.table2_fk = table_2.pk)
>
> update table1
> set column_name = 'New Value'
> where
> table2_fk in (select pk from table2)
You may find updating a join will outperform both...
update (
select appropriate_cols + prim keys from tableA, tableB
where a.primkey = b.primkey)
set ...
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Tue Apr 25 2000 - 00:00:00 CDT
![]() |
![]() |