Tuning: how distinguish PL/SQL timings from SQL in trace and/or tkprof output?

Hi,
we have a performance problem with one of our customer's databases and are trying to tune it out.
The activity in question is a long-running PL/SQL stored procedure operating more-or-less in batch mode, calling many sub-procedures along the way. The PL/SQL code has been instrumented to take timings of execution of different operations, and we are running with tracing on, and analyzing the trace output using TKPROF.
Oddly, even though we are running through 70+ pages of PL/SQL code, with bulk-collect into large tables and nesting of SQL in other SQL cursor loops, TKPROF is reporting SQL times which account for nearly all the elapsed time reported by our log messages. I mean, we're talking within one or two percent of elapsed time.
How can I distinguish the time spent in PL/SQL operations from the time doing an execute or a fetch in SQL? Should I just believe TKPROF when it says all the time is going into SQL?
Thanks in advance...

A common problem with Oracle timings is the granularity of the clock can give misleading results when viewed over many itterations. That might not be your issue but it's worth noting. I would suggest you use DBMS_PROFILER if you want to get a more accurate picture of your codes performance. In most PL/SQL processes, the SQL will account for the vast majority of the processing time (maybe even 95%+). You really have to be doing some intense string or analytical processing for that percentage to change much.
Richard

Similar Messages

  • How to access Oracle 8g from SQL Server 2005 SP3 EE 64 Bits ?

    Dear All,
    How to access Oralce 8g from SQL Server 2005 SP3 EE 64 Bits (liked server).
    Best regards,
    Miguel Gavinhos

    Hi!
    For the Oracle version is 8.1.6. what should I install, to access Oracle trought a linked server.
    Best regards
    Miguel Gavinhos

  • How to connect to db from sql navigator ?

    database active and working.
    login from web working normally.
    how to connect to db from sql navigator ?

    Remote connections generally need three bits of information, whether its an oracle, odbc, or some other type of client ...
    1. Where does the database "live" (hostname or IP address)
    2. What port is the database listener "listening" on for connections
    3. What is the database service name or $ORACLE_SID
    Default port is 1521, if its an XE install the service name is XE out-of-the-box (as set up by the installer and no DBA intervention.)

  • How to Call a Procedure from SQL ?

    Hi All,
    I've a procedure defined like the below taking IN/OUT parameters as table type.
    PROCEDURE "SAP_HANA_DEMO"."usersCreateMethod" (IN row "SAP_HANA_DEMO"."User.Details",
    OUT error "SAP_HANA_DEMO"."EPM.Procedures.tt_errors")
    Now, how do i call it from SQL ?
    I'm trying to call it like
    CALL "SAP_HANA_DEMO"."usersCreateMethod"('my_global_table','?');
    It says
    Could not execute 'CALL "SAP_HANA_DEMO"."sap.hana.democontent.epm.Procedures::usersCreateMethod"('my_global_table','?')'
    SAP DBTech JDBC: [1288]: expression cannot be used as an assignment target: '?': line 1 col 97 (at pos 96)
    Thanks & Regards
    Sakthivel

    Hi ,
    You should call like this
    Define a variable of your table type.
    Define ErrorMessage SAP_HANA_DEMO"."EPM.Procedures.tt_errors"
    CALL "SAP_HANA_DEMO"."usersCreateMethod"('my_global_table',ErrorMessage);
    Regards,
    Krishna Tangudu

  • Help with translating SQL query from SQL Server syntax to Oracle syntax

    Hi,
    is it someone that can help me translate following SQL query from SQL Server syntax to Oracle syntax.
    SELECT ID,
    [LMT(MTR)] = MAX(case when TYPE = 'LMT' then VALUE end),
    [AAD(KGM)] = MAX(case when TYPE = 'AAD' then VALUE end),
    [VOL(MTQ)] = MAX(case when TYPE = 'VOL' then VALUE end)
    FROM yourtable
    GROUP BY ID
    Your help is highly appreciated, thanks in advance.

    Like this,
    SELECT ID,
    MAX(case when TYPE = 'LMT' then VALUE end) LMT_MTR,
    MAX(case when TYPE = 'AAD' then VALUE end) AAD_KGM ,
    MAX(case when TYPE = 'VOL' then VALUE end) VOL_MTQ
    FROM yourtable
    GROUP BY ID-Arun

  • Need command to run sql script from sql prompt

    Hi,
    I am beginner in sql i need a command to run sql file from sql prompt.In notepad i have write 10 to 15 tables creation and saved as .sql i want to run this file from sql promp pls some one help.I am very great full to all users in this forum.

    You can also use the 'start' command.
    You may also want to look in the SQLPlus User Guide and Reference (for your release) at the set command for commands to set the number of lines per page, turn headings on or off, and so on:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/toc.htm
    HTH -- Mark D Powell --

  • How to capture an image from my usb camera and display on my front panel

    How to capture an image from my usb camera and display on my front panel

    Install NI Vision Acquisition Software and NI IMAQ for USB and open an example.
    Christian

  • TS1702 how do you stop itunes from downloading apps over and over again and again like for ever it wont stop  help.

    how do you stop itunes from downloading apps over and over again and again like for ever it wont stop  help.
    i tryed everything i  can in the setting and so on , i even clicked on the downloads arrow to pause it and delete them but like i said it will now stop.
    theres apps i just dont want. theres a list of them but theres not a place were i can get rid of them. it also says some stuff about icloud yeah right like i have ios 5 or 7 ha . pod touch 2 is what i have lol . plz help thanks.

    to the right by search library theres an arrow there click on it : it will show you what it is downloading , from there you can pause and select all and delete them but still will continue to download them if you tell itunes to check for downloads. that download engien is crazy i tell yeah.
    no matter what we do it will still download them trust me i tryed everything and i also went to icloud to see if it was there but to what i see is that there is no apps there this is some crazy itune program that needs to remade.

  • How do I stop firefox from keeping my email and password online for facebook?

    how do I stop firefox from keeping my email and password online for facebook?
    == This happened ==
    Every time Firefox opened
    == in the past week

    If you are not on Windows then see [http://kb.mozillazine.org/Menu_differences]
    See [[Options window - Security panel]]
    See also:
    * http://kb.mozillazine.org/Deleting_autocomplete_entries
    * http://kb.mozillazine.org/Password_Manager

  • How do I stop Firefox from filling in usernames and passwords when other people use my computer?

    When other people use my computer, how do I stop Firefox from filling in usernames and passwords?

    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    Remove saved Password(s):
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    Password Manager:
    *http://kb.mozillazine.org/Password_Manager

  • How can I remove iCloud from my Mac Book and iPad and Mac Book Air and then just reload back on the MB Air and iPad only?

    How can I remove iCloud from my Mac Book and iPad and Mac Book Air and then just reload back on the MB Air and iPad only, which have a different user with a separate Apple ID?

    You have quite muddied up the waters, I'm afraid. Assuming you now have a single GUID partition formatted Mac OS Extended, Journaled, you should try reinstalling Lion:
    Reinstalling Lion/Mountain Lion Without Erasing the 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 the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    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 click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Lost home PC with my iTunes account on it in a home fire.  How can I take everything from my iPhone 4 and put it on my new PC?

    Lost home PC with my iTunes account on it in a small home fire.  How can I take everything from my iPhone 4 and put it on my new PC?  Is this even possible?  iPhone 4 / new PC running Win XP Pro.  I have backed up to iCloud recently so the info is out there, just need to bring it down onto my PC....
    Need HELP.............

    Copy from iPod to computer
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities
    The sync to iPhone
    iTunes: Syncing media content to iOS devices and iPod

  • Hey guys i just wanna ask you if you know any way how to recover pics deleted from my camera rol and photo stream, i deleted accidentally without backing it up on icloud, any ideas how i can get it back

    hey guys i just wanna ask you if you know any way how to recover pics deleted from my camera rol and photo stream, i deleted accidentally without backing it up on icloud, any ideas how i can get it back

    If you deleted them from both PhotoStream and the camera roll, and you don't otherwise have them backed up, they're gone.

  • I am using the window xp and firefox 6. I see many videos on youtube. How I get that videos from the catch folder and where is it?

    I am using the window xp and firefox 6.
    I watch the youtube videos online.
    How I get that video from the catch folder and where that catch folder are situated in the window xp.

    ''How can I view or retrieve a video from Firefox's cache''
    To actually view/retrieve the file from the cache and its web address you can use
    the "Cache Viewer" extension 32.8KB
    * https://addons.mozilla.org/firefox/addon/cacheviewer/
    * http://dmcritchie.mvps.org/firefox/firefox.htm#cacheviewer
    For you to be able to view the cached file you would have had to have watched the entire file.
    The latest version of the extension is 0.7b available in all versions you would have to override compatibility by any of these methods
    * checking or pick up one of the xpi versions in the reader comments for Firefox 6.0
    * extensions.checkCompatibility.6.0 set to False
    *: http://kb.mozillazine.org/Extensions.checkCompatibility
    * or with an extension "Add-on Compatibility Reporter" (84.0 KB) seems preferred in this group
    *:https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    There are also extensions such as Video downloader 132.8 KB
    * Download YouTube Videos + Flash Video Downloader / Download-Helper
    *:https://addons.mozilla.org/firefox/addon/download-youtube-videos/
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem after you've tried several things.</small>

  • How i can enter information from Database to jtree and update it

    How i can enter information from Database to jtree and update it

    Is the memory cache enabled (about:cache)?<br />
    You can open about: pages via the location bar like you open a website.
    *http://kb.mozillazine.org/browser.cache.memory.enable

Maybe you are looking for