Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A question about UPDATE. How smart is oracle
Ole Hansen wrote:
> Hi !
>
> A quick question from a danish oracle newbie.
>
> I have 2 tables, and i want to update a field in table t1 with the sum
> of a field in table t2.
>
> The tables are BIG, so therefore i want the statement to be a
> effective as posible.
I would want that if the tables each contained only a single row.
>
> I have made 2 statements, shown below. Which one should i use ?
Quite simply the one that after creating all appropriate indexes, and running dbms_stats, is most efficient of time and resources.
Run EXPLAIN PLAN and/or AUTOTRACE. A DBA where you work will no doubt smile when you ask for help doing this as most DBAs despise developers that don't do this on every SQL statement they write.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Mon May 16 2005 - 19:20:48 CDT
![]() |
![]() |