Home » SQL & PL/SQL » SQL & PL/SQL » Parallel execution: how to.
icon9.gif  Parallel execution: how to. [message #235258] Fri, 04 May 2007 09:37 Go to next message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

Hi there,
i've a question about parallel execution of procedure inside database 10g.
I have a package, for the booking system, that when is invoked calculates prices for the accomodation.
We are thinking to provide also other information to the user such as the accomodation availability. But i don't want to increase the execution time.
So, i've thought to make a parallel execution. In the same prices package, the first thing i wanna make is to calculate availability but without waiting for it. At the end of the price calculation I read the result of the availability inside a table. If the availability calculation si not finished i can wait for just some seconds.
I know that i can make something using dbms_scheduler but i don't know how to execute scheduler for just one time and how to pass it
some parameters (maybe could i use package variables?).

The way i choose is correct, is it?
Please, could anyone help me? Thanks in advance.
Re: Parallel execution: how to. [message #235659 is a reply to message #235258] Mon, 07 May 2007 11:07 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
Set it up as separate jobs - you can then DBMS_JOB.SUBMIT() them to run in the background.

PS: Consider using DBMS_SCHEDULER.SUBMIT_JOB() if you are on 10g.
Re: Parallel execution: how to. [message #235807 is a reply to message #235659] Tue, 08 May 2007 01:22 Go to previous message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

Hi Frank,
thanks for your comment.
I know that i can use dbms_scheduler and using the parameter use_current_session = false in the run_job procedure i can run process in parallel mode (one of them is in background).
Now my problem is: how can i write a "dynamic" scheduler? Or how can i pass a parameter to a scheduler?
The process i've created is based on a PLSQL_BLOCK but the parameters it has to accept are based on the session.

Thanks in advance.

Bye,
Giulio
Previous Topic: Exception Handling
Next Topic: order by day
Goto Forum:
  


Current Time: Thu Dec 08 14:40:14 CST 2016

Total time taken to generate the page: 0.16613 seconds