Run the same procedure many times in parallel but no more than 10 at a time

I have a table filled with individual such criteria and want to run a stored pl/sql procedure to run searches on an external server on each of them. The stored procedure deals with the API and the external server can handle the concurrency.
I want to be able to the multiple searches concurrently (ie. run the stored procedure concurrently) but no more than 10 concurrent searches at a time (There are 20,000 searches to complete).
I'm thinking this should involve AQ whose messages call "run once" event based jobs from the Scheduler (I'm running on 10g) but I am very new to Oracle and hence not sure where to begin.
If somebody could fill in my obvious blanks and give me an approach that will actually achieve my end I would be extremely grateful!
Cheers, Kim.

> I'm hoping that each of my "spawned threads" (Jobs)
will insert all outputs into the same table (I don't
mind them waiting on each other as it is the
searching that is the real bottle neck). Is this
going to be a spanner in the works?
Inserts into the same table is not a problem. The typical problem is spawning multiple copies of the same PL/SQL proc to update the same table. Somehow each PL/SQL proc needs to find itself a unique set of rows to lock and process - without impact its fellow processes. Using ROWNUM ranges for example does not work in this case.
The search implies I/O. This is good and bad.
Good in that the only real way to speed up a ton of I/O (assuming that the ton of I/O is non-negotiable and must happen) is to perform the I/O in parallel. I/O is the slowest operation on a db platform due to I/O latency. And this parallel I/O processing exactly what Oracle does with Parallel Query (PQ).
The bad is that more processes means a bigger resource footprint and one needs to figure out just what the optimal size is.
Oracle PQ has a very simplistic mechanism - it allows you to specify the number of PQs that can be spawned (and if on a a cluster, on how many nodes) per table. It also allows you to specify a PQ process pool ceiling.
But this is fairly primitive as you still need to figure out (in some way) what the optimal PQ sizes are per table.
The bad is that you either need to do something primitive and similar to PQ - which means a manual monitoring and tuning - or you need to try and automate it. Which in itself can be very interesting, but complex to develop and often quite difficult to get right.

Similar Messages

  • My husband has paired his phone using the remote app to the TV- I would like to do the same with my phone. Can we pair more than one phone to the tv using the remote app ?

    My husband has paired his phone using the remote app to the apple TV- I would like to do the same with my phone. Can we pair more than one phone to the tv using the remote app ?

    Yes I believe so. Try it and see you can always delete the Apple TV from a remote if it messes things up.
    But we have three remotes setup to do this. My iPhone and iPad and my wifes iPhone. She has a different iTunes logon but it seems to work fine

  • How to run the same procedure in parallel for different parameter value.

    Hi There,
    I am currently working on extracting data in to flat file and I am able to do so for one revenue month (e.g. 200101) using PL/SQL procedure(get_rev_data). it takes almost 1 hour to execute the procedure completely and it generates 400 MB data file. Now I have to run this procedure for last 10 yrs of data (i.e. 120 revenue months) . my prolem here is to figure out a way/logic in such a way that I can run the procedure in parallel for each revenue month and at the same time it will write the data in respective data file for each revenue month. so the final result of this exercise would be 120 flat files, one for each revenue month with file names like
    EXTRACT_00001001 to EXTRACT_00001120.
    where
    first five digits : 00001 will indicate the Extract run number and
    last three digits : 001 will indicate the thread number for each run.
    I am thinking of doing this by creating a table "RevMonth" with two values (revenue_month, thread_num) and calling the procedure in a simple select statement and passing revenue_month as parameter of the procedure like
    SELECT get_rev_data(revenue_month, thread_num)
    FROM REVMONTH;
    But I am not sure if that will do the needful. Any idea on how to achieve this will be of great help. Thank you.

    Hi Smit,
    Thanks for the advise. I am not planning to run for all 120 months at once. actually I am planning to run like 1 year (12 revenue months at a time). I am not sure if that will work well but I was planning to run this through shell script (Unix) and will call the same procedure with different parameter (revenue_month and Thread_number) values and see what happens. I hope that will run in parallel for each revenue month.
    Let me know if you have more knowledge about it. THanks a lot.
    Thanks,
    .

  • After closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    after closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    You can always shut it down manually via the Task Manager
    (CtrlShiftEsc)...
    On Mon, Sep 1, 2014 at 3:05 PM, frank koethen <[email protected]>

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • "OIM Database Application Connector" is Recon the same user many times!

    Hey,
    I am facing an interesting issue that my OIM Database Application Connector is reconning (Creating) the same user many times.
    I have created/configured the "OIM DB Application Connector" which should Recon the new user in to OIM when ever new user created in the database via portal. I scheduled the connector every 15 min. The connector is working as expected and creating new OIM user if any new user has created in the DB table.
    Issue here is: I have created one user in the table which has reconed to OIM and I can see the entry in design console Recon Manager table. After 15 min when connecotr is run it is picking up the same user. So it is picking the same user every time it runs!!!. It stops picking the user after some time, but dont have exact time when it stop picking the user. But I could see min 25+ times same user and all the time the status is EVENT LINKED. Any idea please why it is happening. My matching criteria is Time Stamp Attribute: "Updated_By_Sysate" & Unique Attribute = "User_ID".
    My Env:
    OIM Version: 9101
    Server : Weblogic
    DB : SQL Server 2005 (Source DB)
    Any idea please?
    thanks
    kln

    1) Yes, you should add in your resource object all fields that are defined in xel_data_source parameters of config.xml file.
    2) Correct. You have to create a user defined field in your form designer and map it to a column in your process definition (reconciliation field mapping tab).
    3) Reconciliation rule is the rule that OIM use to link Database users and OIM users. You need to create a recon rule using an attribute who has the same value in both systems. Also, you need to define this rule in your config.xml file (see how to configure reconcile tasks in connector documentation). So, this attribute used in your recon rule must be required because it will be used to create or link users. You can define any other fields as required, but if one of these required fields are not filled, you will receive a "Required Data Missing" error in your reconciliation manager event.
    4) Reconciliation is used to update OIM with changes made directly in your database table. To update your database table based on OIM changes, you must modify an user attribute in your UD_DBAPP user's form.
    Regards.

  • Running the same code multiple times with different paramters automatica​lly

    Hi guys,
    I want to run the same code multiple times with different paramters automatically. Actually, I am doing some sample scans which takes around 2 hours n then I have to be there to change the paramters and run it again. Mostly I do use folowing paramters only
    X_Intial, X_Final, X-StepSize
    Y_Intial, Y_Final, Y-StepSize
       Thanks,
    Dushyant

    All you have to di is put all of the parameters for each run into a cluster array. Surround your main program with a for loop and wire the cluster array through the for loop. A for loop will autoindex an input array so inside the for loop you just have to unbundle the cluster to get the parameters for each run.
    Message Edited by Dennis Knutson on 07-13-2006 07:50 AM
    Attachments:
    Cluster Array.JPG ‏9 KB

  • Why my iphone produces a bug after it renew for OS5.1.1. The bug is when I use message, type a Chinese word, and then using a releveant word, then the program automately closes. Every time I try the same procedure, it definitely closes.

    Why my iphone produces a bug after it renew for OS5.1.1. The bug is when I use message, type a Chinese word, and then using a releveant word, then the program automately closes. Every time I try the same procedure, it definitely closes.

    Nobody knows? Not even administrators?
    Please it would be really nice to have help on that to take all the benefit of the remote app.
    Thank you very much in advance.

  • I am going to buy a mac mini i7 with 3 thunderbolt displays for forex trading. the question is if i use bootcamp and run windows on the mac mini will the displays still run the same way as if i was running it on Lion?

    I am going to buy a mac mini i7 with 3 thunderbolt displays for forex trading. the question is if i use bootcamp and run windows on the mac mini will the displays still run the same way as if i was running it on Lion?

    No idea if Windows will do it, but you can run Windows without Bootcamp & have OSX available at the same time, which should give you all the Monitors that OSX uses.
    Parallels...
    http://www.parallels.com/
    VmWare Fusion...
    http://www.vmware.com/mac

  • My Macbook Pro OS 10.7.5 will not recognize toshiba hard drive.  I will register on an iMac running the same OS.  Any ideas?

    I have a Toshiba external hard drive that i used with MacBook.  I now have a MacBook Pro running OS 10.7.5.  It does not register that the Toshiba hard drive is plugged in, yet if I plug it into an iMac running the same OS it does work.

    I don't know the answer to your problem, but until you resolve it do not upgrade OS X.
    I would suggest you try a reinstall:
    Reinstall Lion, Mountain Lion, or Mavericks without erasing drive
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu.
    Reinstall Lion, Mountain Lion, or Mavericks
    OS X Mavericks- Reinstall OS X
    OS X Mountain Lion- Reinstall OS X
    OS X Lion- Reinstall Mac OS X
         Note: You will need an active Internet connection. I suggest using Ethernet
                     if possible because it is three times faster than wireless.

  • Running the same sql script in multiple databases

    Hello,
    What is the method to run the same sql script in multiple databases? I want to write a unix script that would select from different databases and run a sql/plsql script in those different databases. What are the ways to write such a unix script? Thank you in advance.

    Just have a parameter which takes in the oracle connection parameters and use it in your sqlplus script with your shell script.
    Your sqlplus script can have a procedure/function call or an anonymous block;
    Then have a wrapper script to call the original script with different connection parameters. Hope this helps.

  • I bought a new iphone and as i was setting my apple ID account and i signed in to my account and confirmed two useres with diffrent numbers that were signed to the same apple ID and it messed up my i messege and face time. how do i fix that ?

    i bought a new iphone and as i was setting my apple ID account and i signed in to my account and confirmed two useres with diffrent numbers that were signed to the same apple ID and it messed up my i messege and face time. how do i fix that or delete one user ?

    Hello sapiii96,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    To sign out of your Apple ID
    Go to Settings > FaceTime, tap your Apple ID, and select Sign Out.
    Go to Settings > Messages > Send & Receive, tap your Apple ID, and select Sign Out.
    Best of luck,
    Mario

  • Can the 4th gen iPod Touch run the same apps as iPhone 4?

    I am sorry, I'm not much informed about stuff like this, so I'm pretty much a noob.
    I got my eye on the new iPod Touch, especially because it is (from what I've read) an iPhone 4 without the phone and the GPS and a somewhat slightly inferior camera and display. I like the iPhone, too, of course, but the price is something that is really important to me, so it's iPod Touch for me.
    I read about all the new features for the new iPod, such as games and other apps, but I'm wondering - can it run the same games apps as the iPhone?
    From the fact they operate on the same OS and that they're very similar hardware wise (same processor) I concluded that they can run the same apps, but as I never seen it officially and as there only "iPhone apps" on iTunes store (not iPod Touch apps) I got the impression that might not be true.
    So I am asking here now, does the latest iPod Touch run the same apps (games etc.) as the latest iPhone? And can I run the iPhone apps I buy from the appstore on the iPod Touch 4th gen?
    I am sorry for my uninformativeness and I thank you in advance.

    Most of the iPhone apps will work the same way on the 4G iPod as they do on the phone. However, other that rely on the specific feature unique to the phone may install but will not work well if at all. The App Store should identify the system/device requirements.

  • I followed the same procedure of reverse calculation from MRP pricing calcu

    hi,
    sap gurus,
    i followed the same procedure of mrp calculation but
    MRP Pricing Procedure:
    Go through the following:
    I will brief your requirement in short
    MRP = 1012.5/-
    VAT = (1012.5/1.125) = 900/-
    so price before discount will be = 900/-
    discount given at the rate of 10% = 100/-
    Initial Price = 1000/-.
    1. Create condition types as below:
    ZR00 for price
    Condition class = B
    Calculation type = C
    Plus/minus = A
    ZSET for settlement (to knock off the effect of ZR00)
    Condition class = A
    Calculation type = C
    Plus/minus = X
    ZWST for tax
    Condition class = A
    Calculation type = H
    Condition category = D
    Plus/minus = X
    Z007 for discount
    Condition class = A
    Calculation type = H
    Plus/minus = A
    ZDUM for net price
    Condition class = A
    Calculation type = A
    Plus/minus = A
    YWST for tax (to knock of the previous effect - to be used for posting to G/L)
    Condition class = A
    Calculation type = A
    Plus/minus = X
    YOO7 for discount (to knock of the previous effect - to be used for posting to G/L)
    Condition class = A
    Calculation type = A
    Plus/minus = X
    2. The following will be the pricing procedure configuration:
    Step......No........Cond Type........... From.........to..........Man.........Req........Sta................Acc Key
    10........0..............ZR00..................--..........--..........-...........-........---.................ZDU
    20........0..............ZWST..................10............19...........----.............X............X...................
    30........0.............text.......................10...........29...........---...........----.........X
    40........0.............Z007.....................30...........39...........-----.............X............X
    50........0..............text.....................30............49...........---...........-----.........X
    60........0............ZSET.....................10...........19...........----............X............--.................ZDU
    70........0............ZDUM....................50...........59...........----............X............---...............ERL
    80........0............Y007.....................40...........49...........----.............X...........---...............ERS
    90.......0..............YWST..................20...........29...........-----............X...........---................ZWS
    ZDU - dummy account key for posting extra not required items.
    ERL - account key for price
    ERS - account key for discount
    ZWS - account key for tax.
    3. Condition records in VK11
    Condition type----
    Condition record.......
    ZR00........................................1012.5.....................INR will be positive (1012.50 +)
    ZSET.......................................100%...............................will be negative (100 -)
    ZWST.......................................10%................................will be negative (10% -)
    Z007.........................................12.5%.............................will be positive (12.50 +)
    ZDUM.......................................100%..............................will be positive (100% +)
    Y007.........................................100%.............................will be negative (100% -)
    YWST.......................................100%.............................will be negative (100% -)
    Condition records for Z007 & ZWST will be decided as per the conversion required. You will first have to manually calculate the amount for the condition type.
    4. I create a sales order for single quantity for an item & the pricing will be as under:
    ZR00 = 1012.5 (dummy account) - positive
    ZSET = 1012.5- (dummy account) - negative will knock off effect of ZR00
    ZWST = 112.5- (negative & no posting)
    Z007 = 100 (positive & no posting)
    ZDUM = 1012.5 (positive & posting)
    Y007 = 100-(negative & posting)
    YWST = 112.5 (positive & posting)
    but its not throwing any condition records for ZWST and YWST
    can any body help me
    plz
    regrds,
    balaji.t

    HI,
    Plz try Routin for Vat formula.
    i am worked on MRP pricing but in our case formula is different.
    eg.: If i want to calculate VAT for B=1000 Rs. it is like
    A=1000 * ((100/100 + (12.5- VAT 5)))
    = 889
    VAT (Value) = B - A = 1000-889 = 111 which is passed to GL account.
    For that we developed one Routine with the help of ABAP and assign to Pricing Procedure.
    Regards,
    PM

  • Can't add mailboxes to gmail but when I try the same procedure with Bell mail I don't get an edit button so can't add any mailboxes.

    I have 2 email accounts Gmail and Bell mail. I can add mailboxes to gmail but when I try the same procedure with Bell mail I don't get an edit button so can't add any mailboxes.

    Mailboxes can be added only to IMAP accounts. Is Bell setup as IMPAP or POP?

Maybe you are looking for