Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Performance question - Updage with Correlated/Non Correleated Sub Query

Re: Performance question - Updage with Correlated/Non Correleated Sub Query

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/04/24
Message-ID: <956596899.2063.0.pluto.d4ee154e@news.demon.nl>#1/1

kdc <kcameron_at_navicsys.com> schreef in berichtnieuws QL_M4.160834$AT6.227794_at_dfw-read.news.verio.net...
>
> 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)
>
>
>
>

 update table1
 set column_name = 'New Value'
 where
 exists
(select 'x'
 from table2
 where table_2.pk = table1.table2_fk)

Please note the minor changes which should make all the difference.

Hth,

Sybrand Bakker, Oracle DBA Received on Mon Apr 24 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US