Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail
From: pobox002@bebub.com
Newsgroups: comp.databases.oracle.server
Subject: Re: update statement PL/SQL
Date: 28 Apr 2005 06:24:59 -0700
Organization: http://groups.google.com
Lines: 36
Message-ID: <1114694699.218361.61790@f14g2000cwb.googlegroups.com>
References: <1114649010.662975.82850@f14g2000cwb.googlegroups.com>
   <1114654550.179813.134900@f14g2000cwb.googlegroups.com>
   <1114661491.917407@yasure>
NNTP-Posting-Host: 63.170.34.132
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1114694707 4911 127.0.0.1 (28 Apr 2005 13:25:07 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 28 Apr 2005 13:25:07 +0000 (UTC)
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: f14g2000cwb.googlegroups.com; posting-host=63.170.34.132;
   posting-account=YM45kwwAAAC1wFE37dy2aR73mlHAy-uE
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.server:241486

DA Morgan wrote:
> pobox...@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.

-- 
MJB

