Home » RDBMS Server » Server Administration » how long will my job take
how long will my job take [message #60758] Tue, 02 March 2004 22:21 Go to next message
Sam
Messages: 255
Registered: April 2000
Senior Member
hi all , i have a huge batch job which is inserting a lot of rows in to a table, is there any way to know how long is it going to take to complete? bcos it is taking a lot of time and if i know how long it is going to take, i can cancel or let the job run.

thanx in advance

sam
Re: how long will my job take [message #60761 is a reply to message #60758] Tue, 02 March 2004 23:19 Go to previous messageGo to next message
Ellen
Messages: 5
Registered: April 2000
Junior Member
I don't know exactly how.but I think you can estimate
the time..first you can test how much time insert a small number of rows,such as 100 will take.You can write a script to record the time.Then select count(*)
from the table.division them..you can estimate then.

i think before you insert rows into the table.you'd better set all the constraint disable.That will decrease the time.

good luck
Re: how long will my job take [message #60767 is a reply to message #60758] Wed, 03 March 2004 06:10 Go to previous messageGo to next message
Thiru
Messages: 1089
Registered: May 2002
Senior Member
Is there anything in v$session_longops ?

-Thiru
Re: how long will my job take [message #60770 is a reply to message #60767] Wed, 03 March 2004 10:18 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Consider modifying the code (if you can) to include calls to dbms_application_info. Update the info at reasonable advances in the job.

  dbms_application_info.set_module( 'my-module', 'my-action');
loop...
  -- every 100th row
  if mod(v_current, 100) = 0 then
    dbms_application_info.set_client_info( 'stage 1/2 rec '||v_current||'/'||v_total );
  end if;
  ...
end loop;
  dbms_application_info.set_client_info( 'stage 2/2' );
  end if;
Re: how long will my job take [message #60771 is a reply to message #60767] Wed, 03 March 2004 19:31 Go to previous message
Sam
Messages: 255
Registered: April 2000
Senior Member
no, even if it is not in v$session_longops, if my query is already running, i just want to know how long will it take to complete?
thanx in advance
Previous Topic: some doubt about the CKPT background process
Next Topic: Multimaster Replication
Goto Forum:
  


Current Time: Fri Sep 20 12:48:39 CDT 2024