Procedure is working slow

hi,
i hav an application of vb and database is oracle 9i ,application using a store procedure which is inserting values in a table ,but its take long time to execute.
till then my application gets hanged.
how to resolve it
CREATE OR REPLACE PROCEDURE insert_entry( num1 VARCHAR2, num2 VARCHAR2) IS
BEGIN
INSERT INTO my_table VALUES(num1 ,num2 );
commit;
END;
thxs

>
while if i run this procedure out of application then it works fine but takes time if run through my vb application.Thanks for trying to clarify. it seems that not the database itself is the problem. Since you can run the procedure without trouble out of the application.
The question now is how does your application connect to the database. And how does this procedure "automatically" start?
Maybe you have a connection pool and the application hast to wait until it gets a new free connection from this pool.
Or you have a message queueing table and can read fast enough from the queue.
The solution that was already suggested was not to do one insert at a time but to insert multiple rows at once. This is still a good idea.
You could collect all the inserts (all the 2 values per row) in your vb-Application and build a collection/array.
Then pass this array to the procedure. The procedure will then take care to insert all the data (all rows with all values).
Commit at the very end. As others also already mentioned, committing to often will slow down your whole application.

Similar Messages

  • Hello. My mac pro early 2008 restarts after sleep mode and it works slower. I tested it with apple hardwear test and it seems to be ok. Thank you.

    Hello. My mac pro early 2008 restarts after sleep mode and it works slower. I tested it with apple hardwear test and it seems to be ok. Thank you.

    Try this:
    clone your system and repair it with Disk Warrior instead
    Or try a clean test system install on another drive
    A must: SmcFanControl 2.2 - a mere 400 rpm extra to keep air cooling up
    Try to run w/o externals. MyBook included.
    Is that a 7200.11 1TB? they had a lot of issues.
    Run AHT off your OEM DVD.
    2008 had to have EFI and SMC updates to deal with freezes on wake from sleep, and like all models, high inrush current.  Hopefully you have a UPS and is 1500VA unit.
    When you do hard restart from power button, you almost certainly add more directory errors and to files requiring immediate attention to repair and rebuild the directory; and to scan and repair and delete cache and temp files and folders. A must. Invest in bootable backups SuperDuper along with Disk Warrior (or TechTool Pro 6, maybe Drive Genius 3 but I'd rate that #3).
    TimeMachine has its own bad habits, especially with Green drives and some externals.
    Try to rule out everything and then add back one at a time.
    And it may just be time to replace the 8800, very common, a couple threads this week, and it is 3 yrs old.  Might want ATI 5870 or 5770.

  • My mac book is working slow

    sir i have purchased my mac book air in january 2014..... and in the bignning it is working very fast .... but now it is working slow .... and some times it hangs also .... so please give some solution to make my mac book same as before.... thank you...

    OS X Mavericks: If your Mac runs slowly?
    http://support.apple.com/kb/PH13895
    Startup in Safe Mode
    http://support.apple.com/kb/PH14204
    Repair Disk
    Steps 1 through 7
    http://support.apple.com/kb/PH5836
    Reset SMC.     http://support.apple.com/kb/HT3964
    Choose the method for:
    "Resetting SMC on portables with a battery you should not remove on your own".
    Increase disk space.
    http://support.apple.com/kb/PH13806
    Run Etrecheck and post report here.
    https://discussions.apple.com/docs/DOC-6173

  • 90% space is empty in my mac book pro still working slow unable to work properly....

    my mac book pro is working slower and i am unable to do any wprk in it... its more than 90% space is empty.

    Back up all data immediately as your boot drive may be failing.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Triple-click anywhere in the line below on this page to select it:
    syslog -k Sender kernel -k Message CReq 'Channel t|GPU D|I/O|Previous Sh' | tail | open -ef
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear.
    A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.

  • Oracle Stored Procedure not working

    Hi Guy's,
    I want to connect directly from Visual Composer to Oracle Database 10.2.x.x using Oracle Stored Procedure and JDBC System to demonstrate how easy you can show data vith VC. So I have created a simple Oracle Stored Procedure, a JDBC System with a valid alias, User mapping (Portal User --> Oracle User).
    When I invoke the stored procedure I receive the following error: "Portal request Failed (Could not execute stored procedure)". The Stored Procedure is working fine in Oracle iSQL*Plus.
    Any idea's?
    Thanks,
    Ridouan

    Hi,
    did you use the portal JDBC as it is described here:
    <a href="https://wiki.sdn.sap.com/wiki/display/VC/Cannotseetables">https://wiki.sdn.sap.com/wiki/display/VC/Cannotseetables</a>
    Best Regards,
    Marcel

  • MultiSelect Parameter with Stored Procedure not working

    I am using Crystal Reports 2008 and SQL Server 2008. I am using a stored procedure which works with a multiselect in SQL side. I am using a string to table utility function in the where clause with the In statment like below:
    WHERE FORMULARY_ID in
    --(@FORMULARY_ID)
      (SELECT Extractedtext
       FROM ClarityTST.[rpt].[LHfn_StringToTable]( @FORMULARY_ID, ',') ) 
    When I try to use the stored procedure I get an error message:
    "The stored procedure cannot accept multiple values. Please ensure that the multiple value is set to False:"
    I would like to use it with multiple parameters.

    Crystal uses arrays to handle multiple values.  As far as I'm aware, there is no way to get a multi-valued report parameter into SQL (command or SP) directly.  In the past, I have used a "shell" main report that gets the parameters, used Join() to concatenate the selected values into a single string, then pass that to the "main" subreport, and into its SQL or SP.  The SQL than would need to find the database field in the string.  If you make the string passed to the subreport valid SQL for an IN clause, you could do it that way, too.
    HTH,
    Carl

  • HT5457 my ipod 4th gen is working slow

    my ipod is working slow and hangs for few seconds sometimes after updating to ios6 and some apps have stopped working too. is there any solution to this or any way to downupgrade the ios ?

    What happens when you restore the iPod as the message says?

  • My ipod is working slow when i type in something it just type too slow

    my ipod is working slow when i type in something it just type too slow

    Close apps in the multitasking bar.
    Restart/Reset/Restore your iPod.

  • Flash work slow when the page is in background of browser

    I'm developing a game during which a clock which states that every three seconds a soldier will be added to the screen , and another clock that moves the soldier from the left to the right side of screen every 20 milliseconds .
    Everything works correctly, until the game rises locate the air. If the user chooses to leave the game for a few minutes and messing with another page in browser , the watches of the Flash game starts to work very slow , which is why the soldiers are moving at low speed and thus accumulate masses of soldiers on screen, while they were supposed to be gone long .
    I'm trying to create a " self timer " , instead of dealing with flash clock ( Timer ) , but I got involved with recursion fills the cartridge and creates StackOverFlow error.
    I can not use the event Event.ENTER_FRAME etc. , because also this event work slow when the game is in the background
    What to do ? Who can help me?

    Thank you!
    I solved it, similar to what you suggested, through the ACTIVATE event is linked to the stage.  That:
                        private function stageDeactivate(e:Event)
                                  if (stage != null)
                                            stage.removeEventListener(Event.DEACTIVATE, stageDeactivate);
                                            stage.addEventListener(Event.ACTIVATE, stageActivate);
                                            stopSoldiers();
                        private function stageActivate(e:Event)
                                  if (stage != null)
                                            stage.removeEventListener(Event.ACTIVATE, stageActivate);
                                            stage.addEventListener(Event.DEACTIVATE, stageDeactivate);
                                            playSoldiers();

  • I'm using iPhoto '09 on my macbook, and it's just working slow

    I'm using iPhoto '09 on my macbook, and it's just working slow - lots of pinwheels and lagging. My library is big - (134.71 GB to be exact). What can I do to make my iPhoto run smoother??

    How much Ram?
    How much Free Space on your Mac?
    How Many items in the Library?

  • I have updated to Photoshop CC (2014), and uninstalled CC version, but 2014 is working slow, so want to go back to earlier version. How to do that?

    I have updated to Photoshop CC (2014), and uninstalled CC version, but 2014 is working slow, so want to go back to earlier version. How to do that? I am not able to find CC in creative cloud manager and when I am trying to download via web, it's downloading the 2014 version.

    Elina08 hi,
    you can follow these steps -
    https://creative.adobe.com/link/c4a343ec-935e-43ff-aa1c-a3e3d0caadbb

  • Macbook pro retina display working slow

    Yesterday, I woke up the macbook pro from sleep mode and i had several apps opened.
    Then when i did the mission control it was working very slowly. All the gestures of the track pad were working slowly.
    Then after a while it started to freeze. So I restart the laptop, but the problem did not solved.
    Its working slow, and its been almost 15 days from the day i bought the laptop.
    I have a macbook pro retina display 15" 16gb ram and 512gb flash storage.
    Please Help me!!

    My retina MacBook Pro has had terrible graphics performance problems for a couple of weeks. I searched all over various forums and tried everything: resetting SCM, manually selecting discrete/integrated graphics card, deleting graphics kexts, etc. Nothing helped until I found this: https://discussions.apple.com/message/19880198#19880198
    Now my rMBP has silky smooth graphics again!
    The directions in that post are a little hard to understand so I cleaned them up here:
    Step 1: Delete system windowserver preferences
    In the Finder, from the menu bar, select "Go -> Go to Folder..."
    Enter: /Library/Preferences/
    Delete the file called com.apple.windowserver.plist
    Step 2: Delete user windowserver preferences
    In the Finder, from the menu bar, select "Go -> Go to Folder..."
    Enter: ~/Library/Preferences/ByHost/
    Delete all files that start with com.apple.windowserver   (On my rMBP, there was one file called com.apple.windowserver.12AFB147-95D6-5C70-8F62-C1E4F2BE81BE)
    Step 3: Reset the PRAM
        (These instructions are from http://support.apple.com/kb/HT1379)
    Shut down your Mac.
    Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
    Turn on the computer.
    Press and hold the Command-Option-P-R keys before the gray screen appears.
    Hold the keys down until the computer restarts and you hear the startup sound for the second time.
    Release the keys.
    Hopefully this helps others with bad graphics performance on retina MacBook Pros.
    For anyone that wants to check out the problematic plists from my rMBP, here are the files:
    http://jherrman.com/slow-rmbp-2012/com.apple.windowserver.plist
    http://jherrman.com/slow-rmbp-2012/com.apple.windowserver.12AFB147-95D6-5C70-8F6 2-C1E4F2BE81BE.plist
    Jeremy Herrman

  • FCP working slower on newer Mac

    Recently upgreded from an old G5 Power PC to a 2.7 GHz Intel Core i5.
    I am working in FCP 6.0.6 and it is actually working slower. I am getting pinwheels before playback that I never got before. Is there a setting I can adjust? Seems crazy that a hardware upgrade should set me back.
    Thanks!
    Scott

    There are a lot of variables that go in to fcp performance and it's hard to diagnose problems from a distance.  When I upgraded from my dual 2.5 gig g5 to a macpro a year and a half ago, I saw a big improvement in performance. 
    Have you tried deleting your fcp preferences? 
    https://discussions.apple.com/docs/DOC-2491
    Tried creating a new user (systempreferences:  accounts).
    Do you have any peripherals connected besides a keyboard and mouse?  If so, try and disconnect them.

  • Making a procedure to work against 8i, 9i and 10g databases

    Hello all,
    I made a procedure that gathers info from user. At some point I execute this part of code:
    CURSOR tabPrivs IS
    SELECT owner, table_name, privilege, grantable, hierarchy
    FROM dba_tab_privs
    WHERE grantee = uName;
    At first my procedure was only for 9i and 10g databases. I tried it once on 8i and get the logical error that the hierarchy column doesn't exist in the table dba_tab_privs.
    I want my procedure to work against all versions of databases so I tried to do an additional select if the database version was upper than 8, but it seems that it won't compute, as if before executing my procedure, the engine look to all the select I am trying to do and check if they are correct.
    I want to know if there's a work-around because I want to provide the most generic procedure possible.
    Thank you,

    You need to declare your cursor according to your DB version. Something like this might keep you going:
    DECLARE
       VERSION         VARCHAR2 (30);
       COMPATIBILITY   VARCHAR2 (30);
       uname           VARCHAR2 (30);
       TYPE cur IS REF CURSOR;
       p_sys           cur;
    BEGIN
       DBMS_UTILITY.db_version (VERSION, COMPATIBILITY);
       IF VERSION LIKE '10%' OR VERSION LIKE '9%'
       THEN
          OPEN p_sys FOR 'SELECT owner, table_name, PRIVILEGE, grantable, HIERARCHY
               FROM dba_tab_privs
              WHERE grantee = :uname' USING uname;
       ELSIF VERSION LIKE '8%'
       THEN
          OPEN p_sys FOR 'SELECT owner, table_name, PRIVILEGE, grantable
               FROM dba_tab_privs
              WHERE grantee = :uname' USING uname;
       END IF;
       do_your_fetch_and_work_here;
       CLOSE p_sys;
    END;

  • RELEASE PROCEDURE THROUGH WORK FLOW

    Dear Sirs,
            How to configure Release procedure through work flow for the purchasing documents? Which are the modules integrated for this configuration? Kindly
    give me the procedure in detail.
    Regards
    Yoga

    Hi Anand,
        Thanks for your response. In my question I had not mentioned about the criteria.
    The criteria for release of P.O. is on the basis of net value of the P.O. and there are
    two levels of approval as follows.
    If the Value of P.O. is less than Rs.50,000/=,  approval of level1 is required.
    If the Value of P.O. is greater than or equal to Rs.50,000/=, approval of both level1 and level2 is required.
        1.If the value of P.O. is Rs.30,000/=, then it should appear in the mailbox of level1 only. It should not appear in the mailbox of level2.
        2.If the value of P.O. is Rs.60,000/=, first it should appear in the mailbox of
    level1 and after the approval of level1, it should appear in the mailbox of level2
    for next level of approval.
        Is there any detailed documentation available to cofigure the above scenario.
    Regards
    Yoga

Maybe you are looking for