Re: Table update is taking too much time
From: Brent Day <coloradodba_at_gmail.com>
Date: Sun, 29 May 2016 20:04:10 -0600
Message-ID: <CAEz8shzSj8yTPtGDMCTTbmaS17TAHb_py3_M5kjEpSqZgkYDgQ_at_mail.gmail.com>
I forgot a couple of items.
Date: Sun, 29 May 2016 20:04:10 -0600
Message-ID: <CAEz8shzSj8yTPtGDMCTTbmaS17TAHb_py3_M5kjEpSqZgkYDgQ_at_mail.gmail.com>
I forgot a couple of items.
Make sure the execute immediate statements have proper begin end exception handling, something like
BEGIN
execute immediate 'alter index....'
exception
when others then
log the error
end;
Also this moves the truncate and constraint changes into the pl/sql block, remove them from the sh script before the procedure call.
Brent
On Sun, May 29, 2016 at 8:00 PM, Brent Day <coloradodba_at_gmail.com> wrote:
> Ashoke,
>
> Here is an example of what you could do to improve the code. I took out
> all of the logging code and you would want to enhance this to include the
> capture of exceptions in each of the forall blocks to make this code
> better. There are also other ways to accomplish this.
>
>>
>>>
-- http://www.freelists.org/webpage/oracle-lReceived on Mon May 30 2016 - 04:04:10 CEST