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: update statement PL/SQL

Re: update statement PL/SQL

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Thu, 28 Apr 2005 09:29:50 -0700
Message-ID: <1114705554.756919@yasure>


pobox002_at_bebub.com wrote:

> DA Morgan wrote:
>

>>pobox..._at_bebub.com wrote:
>>
>>>Reallybig wrote:
>>>
>>>>I'm a newbie here.  I try to update data from 1 table from another
>>>>table.  So I used cursor to update my employee table on Total_sale
>>>>column  = amount column on Sales Table where employee.empid =
>>>>sales.empid.  The problem is for 700,000, it took 2 hours to update.
>>>>That's too long.  Any Ideas or some sample codes would really
>>
>>>helpful.
>>
>>>>Thanks
>>
>>>Hopefully this is some kind of data warehouse, in which case you

>
> should
>
>>>look into materialized views.
>>
>>Could you please explain how without any DDL or DML you can give this
>>advice?
>>
>>And then explain how this advice has anything to do with updating
>>a table with 700,000 rows? It seems to me a materialized view is
>>completely irrelevant but maybe I'm missing something.

>
>
>
> The column total_sale is stored derived data, redundant and hence not
> normalized. Whenever changes to the sales table occur it will also
> need to be recalculated or it will be inaccurate.
>
> Under these conditions a materialized view is an appropriate
> consideration and in my opinion is a better solution than what
> the OP is attempting to do.

How did you figure all of this out from the OP's original post?

Here is what the OP wrote:
"I try to update data from 1 table from another table."

All the materialized views on the planet will not update a table.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Apr 28 2005 - 11:29:50 CDT

Original text of this message

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