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

Home -> Community -> Usenet -> c.d.o.misc -> performance question

performance question

From: Jan van Veldhuizen <jan_at_van-veldhuizen.nl>
Date: Tue, 8 Feb 2005 21:02:19 +0100
Message-ID: <42091a8c$0$28991$e4fe514c@news.xs4all.nl>


What will be better?

UPDATE table1

SET         table1.some_col =
          (SELECT some_col FROM table2
                     WHERE table2.col_id = table1.col_id)
WHERE EXISTS
        (SELECT null FROM table2
                     WHERE table2.col_id = table1.col_id)

or:

CREATE VIEW my_view AS SELECT table1.some_col c1, table2.some_col c2

            WHERE table1.col_id = table2.col_id

UPDATE my_view SET c1 = c2 Received on Tue Feb 08 2005 - 14:02:19 CST

Original text of this message

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