Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: UPDATE takes so long - any suggestions
Sally Madeira wrote:
>
> I have a simple query - I think it is to update the officenumber in a
> table. It is in the following format:
>
> UPDATE Table1
> SET OfficeNum = (SELECT Officenum
> FROM Table2
> WHERE cliNum = table1.clinum)
>
> Not a problem but it take 20 minutes to update 50,000 records when i
> believe it should only a few minutes.....
>
> I have my indexes I believe set correctly. Any suggestions on how to
> increase the speed of this query. How could I do a mass update....
>
> Any suggestions would be helpful
>
> S
Assuming you want to update every row in tab1 (ie no where clause) I would turn on a trace (alter session set sql_trace = true) and see whats going on...eg triggers firing, foreign keys missingn indexes etc
Also maybe have a look at your alert log for 'cannot allocate' entries in case your log files are too small
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Thu Mar 02 2000 - 00:00:00 CST