Tuning PL/SQL - tkprof still shows a lot of work for the RECURSIVE STATEMENTS

Hello

First of all I don't know if this should be in the "database - general' or 'SQL and PL/SQL. Given that it is more a question specifically on the PL/SQL performance, I'll put here in 'database - general. " I hope that doesn't offend anyone.

I just started watching a performance in our application issue. One of the developers establish me a procedure that replicates the question, I ran by tracing the session and then fed the tkprof on trace file. The results at the bottom of my eyes like this tkprof output file:
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        3      0.01       0.07         10         60          0           0
Execute      3      0.01       0.01          0          3          0           3
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total        6      0.03       0.08         10         63          0           3

Misses in library cache during parse: 1

Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                       5        0.00          0.00
  SQL*Net message from client                     4        1.68          1.70
  db file sequential read                        18        0.01          0.10


OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse      416      0.00       0.01          0          0          2           0
Execute   1456      0.71       0.75         26       1739        425         590
Fetch     2932      0.12       2.21        337       6338          0        3061
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total     4804      0.84       2.98        363       8077        427        3651

Misses in library cache during parse: 25
Misses in library cache during execute: 24

Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file sequential read                       343        0.08          2.09
  db file scattered read                          1        0.00          0.00

   47  user  SQL statements in session.
  888  internal SQL statements in session.
  935  SQL statements in session.
   31  statements EXPLAINed in this session.
I'm looking in particular to this relatively high activity RECURSIVE STATEMENTS, because for me, NO RECURSIFS (ie the actual submitted statements that form our code) seems harmless enough. It's my first experience to try to solve some complex looking for PL/SQL and I have no idea what might be considered more "normal", but I think I know and research on google, the results seem pretty strange to me.

Is this strong activity for RECURSIF INSTRUCTIONS a problem, and if so, what should I start looking to reduce this activity?



Kind regards

ADOS

should I concentrate my efforts on the identification of our STATES RECURSIFS

1 456 executions took 2.98 seconds. If you are concerned? It depends on if it is essential for your application.

Published by: Hemant K grapple on July 30, 2009 16:43

Tags: Database

Similar Questions

  • Commit to taking a lot of time for the update statement to bulk - 11 GR 2

    Hi team,

    We have a source table, which is the main table for our application.

    When I commit a transaction after update block, it takes long about 2 to 4 minutes.

    I don't understand why it takes too long...

    Could you please help me on this fix, please...

    It's the details on the table,

    Total number of records: 35 M record

    Validation interval: 500 records / commit

    Total scores: 3

    total number of columns: 95 - including primary, unique and foreign key columns (all columns will be updated for each update because update from the app online)

    Total no of the foreign key columns: 12

    Unique key column: 1

    Total index: 27 ( including the key index foreign 12 + 1 + 1 index of primary key Unique key index )

    example of update statement,

    UPDATE DIRECTORY_LISTING_STG
    SET
      COLUMN_1 = :VAL_1
      .
      .
      .
      COLUMN_94 = :VAL_94
    WHERE RECORD_KEY = :P_KEY_VAL;
    
    

    The table is.

    Plan hash value: 2997337465
    
    --------------------------------------------------------------------------------------------
    | Id  | Operation          | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------------
    |   0 | UPDATE STATEMENT   |                       |     1 |   308 |     3   (0)| 00:00:01 |
    |   1 |  UPDATE            | DIRECTORY_LISTING_STG |       |       |            |          |
    |*  2 |   INDEX UNIQUE SCAN| XPKDLS_STG_PARTPN     |     1 |   308 |     2   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("RECORD_KEY"=TO_NUMBER(:P_KEY))
    
    

    Details of the database,

    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    "CORE 11.1.0.7.0 Production"
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    
    

    Thank you

    RAM

    2793617 wrote:

    Hello

    I am updating table via an application using Hibernate jdbc connection online.

    If the update statement will be sent to the database in a pack of 500 documents (batch update).

    Thanks Ram

    line-by-line UPDATE is slow by slow transformation

    In Oracle no other session can 'see' upgrade from uncommitted changes.

    The only way to significantly reduce the elapsed time is to have only 1 UPDATE & 1 COMMIT!

  • SQL error: ORA-01840: value not long enough for the format of the date of entry

    It is a delete SQL in a driver of demand, which gives no error, but does remove all the lines either. I have converted the removal 'from' to ' Select * ' and may see the following error:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "CAL_0812")
    Error report:
    SQL error: ORA-01840: value not long enough for the format of the date of entry


    The interesting thing is that if I attach a condition of emplid, then the SQL above does not give an error and return lines:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "FM_CG_0812")
    and emplid = "1234"

    now, if the number of lines is identified (by giving more number of emplids), it begins to give the error when the number of rows returned is greater than about 30. It is completely independent of what employee is used, so there is no question of data dependence.

    Function optimizer cost is off and a subquery nest is off on the init.ora file

    subquery UNNEST= false

    optimizercost_based_transformation = off


    I don't know if it has something to do with this problem.

    Explanations would be welcome!

    Thank you
    Vikas

    I think it is question of data combined with a not very sensible date format mask (it could fail when the null data, because of your concatenation with '01' and work when not null data).
    Have you tried with a simple TRUNC?

    Your code:

    ...TO_DATE(TO_CHAR(ELG.PRD_END_DT, 'YYYY') || TO_CHAR(ELG.PRD_END_DT , 'MM') || '01' , 'YYYY-MM-DD') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    After change:

    ...TRUNC(ELG.PRD_END_DT , 'MM') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    Nicolas.

  • Windows cannot load the driver for this hardware device because a previous instance of the device driver is still in memory. (Code 38) FOR the CD-ROM/DVD-road DRIVE

    I just downloaded iTunes and now my = CD-ROM/DVD-ROM Drive does not work on my Compaq laptop. This is the error that he sees when I go to Device Manager. I need this problem as soon as POSSIBLE, I work on websites and I can't go without my CD burner. Anyone who can help help please. I'm panicking right now.

    Thank you

    Hello

    Use system restore to before that you installed iTunes when the drive was working.

    How to make a Vista system restore
    http://www.Vistax64.com/tutorials/76905-System-Restore-how.html
    ======================================================

    If necessary:

    Step 1: Please do all the same underneath if you did some before as is often total
    a process that solves the problem.

    Try this - Panel - Device Manager - CD/DVD - double click on the device - driver tab.
    Click on update drivers (this will probably do nothing) - RIGHT click ON the drive - uninstall.
    RESTART this will refresh the default driver stack. Even if the reader does not appear to continue
    below.

    Then, work your way through these - don't forget the drive might be bad, could be a coward
    cable or slight corrosion on the contacts (usually for a laptop) and other issues.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs
    http://support.microsoft.com/kb/314060 - a Mr Fixit

    Try this fix manually if the Fixit 314060 does not work
    http://www.pchell.com/hardware/cd_drive_error_code_39.shtml

    Your CD or DVD drive is missing or is not recognized by Windows or other programs-
    a Mr Fixit
    http://support.Microsoft.com/kb/982116

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to
    for Windows Vista
    http://support.Microsoft.com/kb/929461

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    Your CD or DVD drive cannot read or write media - A Mr Fixit
    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    CD/DVD drive does not appear in Windows Vista, or you receive this error in Windows
    Vista installation after booting from the DVD (AHCI)
    http://support.Microsoft.com/kb/952951
    Drive CD - R or CD - RW Drive is not recognized as a recordable device
    http://support.Microsoft.com/kb/316529/

    Hardware devices not detected or not working - A Mr Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    Another possibility is that the cables are loose. Remove ALL power, then make sure that the cables in both
    ends. Remove and replace, do not just tight. For laptops, you can often clean power and
    contacts data with a pencil eraser.

    Some DVD players do not use the Windows default drivers so check with the manufacturer of system and
    manufacturer of device to see if there is a firmware or drivers for your drive if necessary.

    ===============================

    Step 2: You have disc problems as the CD/DVD is actually 4 discs in 1 case (CD & DVD
    Burn and CD and DVD read). So it is not unusual for 1 or 2 operational so that other parts
    do it right.

    Did you follow the Troubleshooting Guide for the reader who still does not work? There are
    the entries in registry that the troubleshooter does not solve and those who "might" be the cause.

    Check with your Maker system and a device for the two possible firmware updates and
    the correct registry entries for your car.

    Here are the keys that I of course are those in question - for the subkeys of the CD/DVD drive
    as there will be other subkeys in these keys. Do not forget to ask specific keys involved as well as
    the parameters.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E965-E325-11CE-BFC1-08002BE10318}

    -----------------------------------------------------------------------

    You can probably find more info here and maybe even the exact registry for your CD/DVD settings
    drive from someone with the same model.

    Forums - a lot of expert real help
    http://Club.myce.com/

    CD/DVD units
    http://www.myce.com/storage/

    Use DevManView to locate the CD/DVD in the registry (be careful and do a prior Restore Point)
    nothing change) - find the DevManView device and then make a right click on it free in RegEdit.

    DevManView - free - an alternative to the standard Windows Device Manager, which displays all the
    devices and their properties in flat table, instead of the tree viewer
    http://www.NirSoft.NET/utils/device_manager_view.html

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • SQL Developer 3.0 EA 1 Advanced support for the type of data in the unit tests

    Hello

    According to SQL Developer 3.0 EA 1 New Feature List (http://www.oracle.com/technetwork/developer-tools/sql-developer/rel3-featurelist-ea1-166831.html#ut)
    the EA 1 version 3.0 supported advanced data types in the unit tests. This means support the ANYDATA and RECORD types? I installed version 3.0 of EA 1 to CentOS linux, but it seems that those advanced types are not supported yet. When I try to add a unit test for a function that returns the record type, I get quick error: "the return of PL/SQL RECORD type is not supported. Cannot test (function_name) because 1 arguments have not supported for types". Also if I try to unit test procedure which parameter is of type ANYDATA, I get quick error: "the type UNDEFINED P_DATA argument is not supported. Cannot test (procedure_name) because 1 arguments have not supported for types". Are those advanced data types supported in SQL Developer 3.0 FINAL version?

    Thank you
    Miikka L

    Edited by: user12844253 the 27.10.2010 16:31

    Hi Mikka,

    Only simple PL/SQL records are currently supported i.e. those containing no optional or repeating components and where all components are themselves supported. This restriction is in place, due to the fact that we are using JDBC as a parameter mechanism which does not directly support the passage the PL/SQL record type.

    ANYTYPE and ANYDATA are currently not supported because they have a dynamic value type and must be set programmatically. In the future, it would be possible to support these via the dynamic value and and validation features.

    This will remain for the final version.

    Kind regards
    Richard

  • My MBP with retina display has no top file, but storage information still show a lot of memory being exhausted by audio, photos and movies.

    Recently, my MacBook Pro with retina display has started to run out of memory, so I moved all my downloads and stuff in my external hard drive. After the transfer, I had some good 20 GBs free and my folder all my files to completely empty.

    But even now when I go into storage under the about this Mac information, it shows that more 1 GB of audio files, about 800 MB of photos and 500 MB of movies.

    Using the search option (and put a black space in the search bar), I discovered a few files in the Mac section, but they were barely a few MBs in size, and no audio or images or movies were present there.

    Where are all these "hidden audio, photographs and films that take about 3 GB of space from my hard drive? I am naïve.

    Here is my overview of the system:

    ********************

    Any help will be much appreciated.

    Thank you!

    < image edited by host to remove the serial number >

    This view will be incorrect until the Spotlight indexing your drive. In addition, it is only an effort to classify the files types are known by their file extension. Thousands of files on the computer, however, will only be classified as 'Other' because they did not have a type that falls into one of five or six available categories. If you want an accurate display of disk space then: press command-I to open the window read the information. In the top panel is a visualization of the status of your drive: capacity, used and available. It's everything you need to know. If you want information on the types of files and their location, and then use a tool such as OmniDiskSweeper or GrandPerspective.

  • my iphone 6plus still shows unread emails, but none in the Inbox

    I deleted all my emails, but on each account it shows not read and a number. How can I clear all this deletion or something else?

    Hi, I had the same problem.

    Try to remove your e email account set up again.

    Good luck!

  • non-installed applications is still shows as "up-to-date" in the Creative Creative Cloud Apps window

    I uninstalled Acrobat Pro XI with the intent or the re - install, but I can not reinstall because the Creative Cloud Apps window shows that it is "up to date".

    (Similiarly, Lightoom 5 is already installed, but it shows that not intalled on this window).

    How to install Acrobat Pro XI if creative cloud thinks that it is already installed?

    mmmm.png

    Thank you

    d

    Please try to run the required to the following knowledge base article account solution.

    http://helpx.Adobe.com/creative-cloud/KB/AAM-lists-removed-apps-date.html

    I hope this helps.

  • Whenever I load a file (.jpg) image in firefox, it shows a grid of tiles for the empty border. Is there a way I can change it to a solid color?

    It has been a solid gray in some older versions of firefox (14 or earlier), so it must be customizable.

    For now, it's showing a grid made up of squares white and cyan checkerboard.

    Already tried to add "background-color: #00000;" to userchrome.css. He has nothing.

    Thanks for trying to help, but I don't think that you have taken the trouble to read the question at all. Flash has no effect display jpg files because it is not even running, and do all the other plugins unless they specifically target the JPEGs

    But in any case, I found a solution, if anyone has the same problem. Read the thread here.

    http://forums.mozillazine.org/viewtopic.php?f=38 & t = 2673125

  • HP 8610 Pro: why don't still no button "Cancel printing" fast for the printer HP 8610 Pro? And issue of the queue.

    This printer prints so fast that he NEEDS an option button fast cancel to cancel a print job.  A quick solutions?

    Also, sometimes when printing from a web application, the printer displays a "printing spool" minutes before it actually prints.  Can it be sped up or cancelled?  Still, the X on the LCD screen does not seem to work. Any thoughts on these issues?

    @Avalon11,

    If it only happens when you print from the Web, it could be a number of things. Could you run printing HP and doctor Scan?

    You can also check and see if the Web browser that you are using requires some updates or try another browser.

    Any help?

  • Will we still have access to Auto rig for the custom character content that we create in the 3rd party software like Maya or Blender 3D?

    We will still be able to take the content of custom character that we modeled ourselves, instead of the Assembly in the fuse and use the automatic Rigger for joint investment and weighting of the skin?

    The Rigger automatic, as this was the Mixamo, is the best solution I've seen for character rigging auto and mapping weight skin.

    It takes a few hours of tedious technical work and simplifies it in 2 minutes.

    Hi Andy!  Mixamo services have not changed at all, so you can download characters customized to auto-rig yet.  Mixamo rigging and animation are all in a free preview, so you can use it to your heart's content.

    Fuse CC also still has the ability to import custom content, but you will need to create it with the Adobe fuse CC content creator package because the content for fuse CC is different from that of the content of fuse 1.3

  • Commit does not work on SQL (but who works for the icon)

    I can't understand it. When I write a script I do not get one commit even if in the result of the statement, it says "engaged." However with the same sql so I get out the commit and just execute the statement and then use the validation icon it works. For example, this will not sql commit

    delete
    Of
    Test_Table
    Where user_id = 'abc123 ';
    commit;

    But if I run it like this and click the validation for this:

    delete
    Of
    Test_Table
    When user_id = "abc123".

    Any info much frequented

    How do you run it? If you use F9 (or the green arrow), it runs only a single statement.
    If you use F5 (or the green arrow with a piece of paper behind it), it will run the entire worksheet (or the selected area) as a script.

    If both statements are running, you should see

    x deleted rows.
    Validation succeeded.

  • Transport CANADA is no longer a part of my network, but my wifi network still works, for the most part. That's happened?

    Until last night, I was able to see and edit my TC through the airport on my MBP or my iPad 2 Air utility. Now, I have received a message in the airport utility which said my TC is no longer part of my network and is no longer accessible.

    Time backup disc machine on the TB is no longer considered by time machine. I can't SMB in the HDD of the TC via the Finder and records, and the data appear to be intact.

    Now the question is what happened to my TC and airport utility?  Any help is welcome. I'm running OS X el Capitan 10.11.6 on my MBP and iOS 9.3.4 on my iPad 2 Air.

    What color is the light on the Time Capsule?

    I would try to unplug it, wait 20 seconds or more and in him reconnecting again. Note that, if there are other devices that are connected yet with success to the time Capsule, you should unplug their first.

  • Disable lightroom 6 and 6 PS to computer that is trashed. I don't want to go to the cloud, I do a lot of work in the desert away from any Internet source.

    I got LR6 and PS 6 working on a laptop that died because of hard drive failure. I kept the media installation and activation of the keys for the two and they were saved to a NAS. I want to reinstall because I can't use commodity is when I go out on photo safaris in Australia and Africa areas who are very remote from all the connections on the web.

    I can not disable the laptop as it is corrupt, then, what can I do?

    I'm moving this post on the forum to download, installation, commissioning

    You are able to install the software on two computers. If you have already installed each twice, please contact support for help

    Contact us

    You can also make reference to: Activation and deactivation of troubleshooting

    You can use the links in the post above to install it.

  • I'm doing a blank publication widget, but he keeps ignoring my changes of State for relaxation. How can I have my state changes still work for the things placed in the trigger?

    So here's what I have so far. The menu works perfectly, thanks to some Youtube tutorials. And everything is connected properly. But the only thing is that the "WORK" button does not change of State which is set up for this. I tried to apply the change of State before I placed it in the trigger area and after. Doesn't seem to do the job.

    Objective status change is essentially the 'WORK' text will turn white and white space in the run will teal'c also turn teal'c. Thus, the colors will be reversed. I have a link next to it, "ABOUT", which is currently successfully. I suppose that if it is not possible then I'll have to find another design... but I would like to know if there is a way to do it!

    Screen Shot 2015-01-02 at 4.00.17 PM.png

    I believe you are trying to get a color for the composition status when its assets? Please publish the site and provide the url to a glance.

    Thank you

    Sanjit

Maybe you are looking for