We have a pl/sql procedure, which is used to process for datapumping, it processes 20 records per min, ... we would like to improve the performance... we have tuned the code as much as possible to improve the performace with various aspects...
We have an idea, to post 4times same procedure with different arguments simultaneously, so it may improve performance 4 times (theoretically)...
Example:
Procedure1(ID1,Filename1) 20 rec processing the same time
Procedure1(ID2,Filename2) 20 rec processing
Procedure1(ID3,Filename3) 20 rec processing
Procedure1(ID4,Filename4) 20 rec processing
this is something like, the procedure has to be assigned in different worker / processor...
so, we need to have a controller script, which will control the operation of all those procedures, and once this process is completed for , it has to take next argument and processes..
I have a question that, how can i pass the arguments of other records once the stage one is completed..., so that the entire record could be processed stage by stage automatically...
i will appreciate you that if you could explain with more details about the same..?
if u plan to use a dbms_job to automatically execute ur procedure .
try preparing script in the following lines .
- i guess u are executing a pl/sql procedure which accepts same number of arguments with similar datatype .
SQL> insert all arguments as values into this table .
create procedure automate
cursor c1 is select id , filename from xyz where .... ;
begin
for r1 in c1
loop
Procedure1(r1.id,r1.filename ) ;
end loop ;
end ;
----
automattically submitting the job
declare
x binary_integer;
begin
dbms_job.submit(x, 'begin automate; end;',
sysdate , 'SYSDATE + FREQUENCY ' , FALSE);
commit;
end;
Thank you very much... Your update comes very close to my question.. Thanks once again...
and i need a clarification that if i use dbms_job, i need to wait till my first record to complete the job... then it will proceed for next record and so on... am i correct ?
In the unix environment, is there any way to do as below:
-assign 1st record to worker1,
-assign 2nd record to worker2,
-assign 3rd record to worker3,
-assign 4th record to worker4 and
restart the workers..
-assign 5th record to worker1,
-assign 6th record to worker2,
-assign 7th record to worker3,
-assign 8th record to worker4 and.. so on repeat till last record to complete...
if i do like wise, performance will be improved to 4 times...
thanks and regards
and second recordeed, multi-process/worker to process my job simultaneousely, i mean
Bookmarks