| From: | Steve Adams |
| Date: | 25-Aug-2000 12:56 |
| Subject: | Update response time |
If the account_id and acct_id columns have unique indexes such that you can
define an in-line updateable join-view, then applying the update to that view
will no doubt work best, as illustrated below. Otherwise, do it from a PL/SQL
loop.
update
(
select
c.*
from
key_control c,
key_fix f
where
c.appl = 'STD' and
c.acct_loc = 'R' and
f.account_id = c.acct_id and
f.pgm_type = 'RECO'
)
set
program_type = 'RECV'
/
-----Original Message-----
Sent: Friday, 25 August 2000 0:36
I am having a problem running an update. It seems to take over 2hrs to
complete an update. I am using Oracle 8.0.5 on a Sun Solaris. I am updating
approx 30000 rows. I have no clue what is the problem. There are 300000
records in the KEY_CONTROLS table and 39000 in the KEY_FIX table.
The Update statement is as follows:
Update KEY_CONTROLS t1
set t1.program_type='RECV'
where appl='STD' and
acct_loc='R' and
acct_id in
(select account_id from KEY_FIX t2
where t1.acct_id=t2.account_id and
appl='STD' and
t1.acct_loc='R' and t2.pgm_type='RECO');