To run a piece of PL/SQL code,  in TT  is much slower than   in ORACLE.

A piece of PL/SQL code , about 1500 lines, package is named rtmon_event, function in it is named rtmon_SHOLD_CUS_RPT;
the PL/SQL code is run in ORACLE.
Now I want to get fast speed, I think of TT.
I rewrite the PL/SQL code by grammer in TT.
But the speed in TT is much slower than the speed in ORACLE.
In ORACLE, to run the PL/SQL code, it need 80 seconds; but In TT, to run the PL/SQL code, it need 183 seconds;
How can I resolve the problem?
Btw: there are some joins of 2 tables, or 3 tables in rtmon_event.rtmon_SHOLD_CUS_RPT, and some complex DML in it.
The run method is :
declare
a number;
begin
a := rtmon_event.rtmon_SHOLD_CUS_RPT ;
end;
Thanks a lot.

The easiest way to view a plan is to use ttIsql and issue the command:
explain SQL-statement;
For example:
explain select a.ol1, b.col2 from taba a, tab b where a.key = b.key;
See the documentation that 'hitgon' pointed you to to help you interpret the plans.
Chris

Similar Messages

  • In CS6, JavaScript Running MUCH Slower than ActionScript

    Hi All,
    I am finding that in CS6, JS code runs MUCH slower than ActionScript code. I don't want to double-post here - Full details may be found where I posted them in the InDesign Scripting forum at  - CS6 JavaScript Running Much Slower than ActionScript, before I realized that this forum might be more appropriate.
    The basic gist of it is that I had a Flex/ActionScript Extension, which I obviously needed to start converting to JavaScript in advance of the next version not supporting ActionScript. I converted 20,000 lines of my business logic code from ActionScript to JavaScript (grrr...) - only to find that it now runs 5 times slower than it did in ActionScript.
    What has been the experience of others who have converted large Extensions from ActionScript to JavaScript?
    I would greatly appreciate any and all suggestions.
    TIA,
    mlavie

    Hi All,
    I am finding that in CS6, JS code runs MUCH slower than ActionScript code. I don't want to double-post here - Full details may be found where I posted them in the InDesign Scripting forum at  - CS6 JavaScript Running Much Slower than ActionScript, before I realized that this forum might be more appropriate.
    The basic gist of it is that I had a Flex/ActionScript Extension, which I obviously needed to start converting to JavaScript in advance of the next version not supporting ActionScript. I converted 20,000 lines of my business logic code from ActionScript to JavaScript (grrr...) - only to find that it now runs 5 times slower than it did in ActionScript.
    What has been the experience of others who have converted large Extensions from ActionScript to JavaScript?
    I would greatly appreciate any and all suggestions.
    TIA,
    mlavie

  • Anyone else? CS4 running much slower than CS3?

    I just upgraded to CS4 from CS3. All of the applications are running much, much slower than CS3, particularly InDesign. My computer is literally fresh out of the box; specs below. Software and patches up to date. Thinking of uninstalling CS4 and reverting back to CS3. Any suggestions/feedback?
    MacBook Pro 15"
    2.66GHz Intel Core 2 Duo processor
    4GB memory
    320GB 5400-rpm hard drive
    NVIDIA GeForce 9600M GT graphics processor with 256MB
    1440 by 900 pixels
    Snow Leopard OX
    Purchased CS4 Master Collection. Other software installed includes iLife, iWork, Office for Mac.

    I'm not using In Design yet, but for Photoshop and Acrobat my sense is that they are fast or faster than CS3, and Snow Leopard has reduced the launch time for all my apps compared with Leopard.
    Yes there are issues with running Adobe apps with Snow Leopard, but some of them are the same issues when running CS3 apps with Leopard--and in any event, these are, I believe, all crashing bugs, not things that slow down responsiveness. I personally have had only a few problems with Design Std CS4 apps + Snow Leopard.

  • My four year old iMac is running much slower than when it was new.  Any suggestions on cleaning out the cob webs?

    My four year old iMac is running much slower than when it was new.  Does anyone have any suggestions on what I can do to "clean it up" and get it running like it used to?

    What year, screen size, CPU speed and amount of RAM installed?
    To find out info about your system,
    Click on the Apple symbol in the upper left of the OS X main menu bar. A drop down menu appears.
    Click About this Mac. A smaller popup window appears. This gives you basic info like what version of OS X your iMac is running, the speed of your iMac's CPU and how much RAM is installed.
    Click on the button that says More Info. A larger window appears giving you a complete overview of your iMac's hardware specs.
    Highlight all of this info and copy/paste all of this into another reply to this post, editing out your iMac's serial number before actually posting the reply.
    This will tell us everything about your iMac so we may begin to help with your iMac issues.
    How full is your Mac's hard drive?
    Locate your iMac's hard drive icon on the OS X desktop. Click the icon once, then use the keyboard key combination Command-I. This will give you additonal info about your iMac's internal hard drive.  
    Post this info in your reply here, also.
    Here are some general tips to keep your Mac's hard drive trim and slim as possible
    You should never, EVER let a conputer hard drive get completely full, EVER!
    With Macs and OS X, you shouldn't let the hard drive get below 15 GBs or less of free data space.
    If it does, it's time for some hard drive housecleaning.
    Follow some of my tips for cleaning out, deleting and archiving data from your Mac's internal hard drive.
    Have you emptied your Mac's Trash icon in the Dock?
    If you use iPhoto, iPhoto has its own trash that needs to be emptied, also.
    If you store images in other locations other than iPhoto, then you will have to weed through these to determine what to archive and what to delete.
    If you use Apple Mail app, Apple Mail also has its own trash area that needs to be emptied, too!
    Delete any old or no longer needed emails and/or archive to disc, flash drives or external hard drive, older emails you want to save.
    Look through your other Mailboxes and other Mail categories to see If there is other mail you can archive and/or delete.
    STAY AWAY FROM DELETING ANY FILES FROM OS X SYSTEM FOLDER!
    Look through your Documents folder and delete any type of old useless type files like "Read Me" type files.
    Again, archive to disc, flash drives, ext. hard drives or delete any old documents you no longer use or immediately need.
    Look in your Applications folder, if you have applications you haven't used in a long time, if the app doesn't have a dedicated uninstaller, then you can simply drag it into the OS X Trash icon. IF the application has an uninstaller app, then use it to completely delete the app from your Mac.
    To find other large files, download an app called Omni Disk Sweeper.
    Download an app called OnyX for your version of OS X.
    When you install and launch it, let it do its initial automatic tests, then go to the cleaning and maintenance tabs and run the maintenance tabs that let OnyX clean out all web browser cache files, web browser histories, system cache files, delete old error log files.
    Typically, iTunes and iPhoto libraries are the biggest users of HD space.
    move these files/data off of your internal drive to the external hard drive and deleted off of the internal hard drive.
    If you have any other large folders of personal data or projects, these should be archived or moved, also, to the optical discs, flash drives or external hard drive and then either archived to disc and/or deleted off your internal hard drive.
    Good Luck!

  • How to insert sql code in module (not form) other than API?

    I generated module as web pl/sql in Oracle Design Editor 6i. I have different user types with different privileges. I want to do some permission checking before a user can reach the tables. All the help are related to API and Form. Is there a way to execute sql code with out using API?

    Yes, you can add in your own user defined PL/SQL (and JavaScript)at module component and item level. Select the module component in the Design Editor and expand the node until you see "Application Logic" -> Events. Now add your logic. For help on this use the context sensitive help and you should find the PL/SQL help. (or try the topic "About user-defined application logic and Web PL/SQL Generator"
    (Is this the piece you wanted to avoid?) You can also add user defined PL/SQL to the Table API generated code. For this you need to use the Server Model tab. Navigate to the Table and expand the node for the desired table and find the Table TAPI/trigger Logic section. Again, make use of the context sensitive help here.
    Regards
    Sue

  • Parameterized queries running much slower than ones with hardcoded values

    Very often there is a huge performance difference when using parameters in a query, compared to running the same code after replacing the parameters with hardcoded values: the parameterized version of the code runs much slower!
    The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed directly from the editor and the performance issue has been observed in different versions of SQL Server (2000 and 2005).
    How is this explained and how can the parameterized queries have similar performance with the hardcoded ones?
    Also, why does this happen in some cases and not always?
    Finally, the same is sometimes the case with stored procs: a very slow running proc speeds up tremendously when running its code directly, instead of calling the procedure --and even faster, according to the previous, when its parameters are replaced with
    hardcoded values 

    >>The case is not parameter sniffing as it is not a (compiled) stored proc, but code executed >>>directly
    from the editor ?>>>and the performance issue has been observed in different >>>versions of SQL Server (2000 and 2005).
    Something like below?
    --SQL Server creates 3 execution plan rather only one
    DBCC FREEPROCCACHE
    GO
    SELECT *
    FROM Sales.SalesOrderHeader
    WHERE SalesOrderID = 56000
    GO
    SELECT * FROM
    AdventureWorks.Sales.SalesOrderHeader WHERE
    SalesOrderID = 56001
    GO
    declare @i int
    set @i = 56004
    SELECT *
    FROM Sales.SalesOrderHeader
    WHERE SalesOrderID = @i
    GO
    select  stats.execution_count AS exec_count, 
    p.size_in_bytes as [size], 
    [sql].[text] as [plan_text]
    from sys.dm_exec_cached_plans p
    outer apply sys.dm_exec_sql_text (p.plan_handle) sql
    join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
    GO
    ----This time only (we get parameterization)
    DBCC FREEPROCCACHE
    GO
    EXEC sp_executesql N'SELECT  SUM(LineTotal) AS LineTotal
    FROM Sales.SalesOrderHeader H
    JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
    WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56000
    GO
    EXEC sp_executesql N'SELECT  SUM(LineTotal) AS LineTotal
    FROM Sales.SalesOrderHeader H
    JOIN Sales.SalesOrderDetail D ON D.SalesOrderID = H.SalesOrderID
    WHERE H.SalesOrderID = @SalesOrderID', N'@SalesOrderID INT', 56005
    GO
    select  stats.execution_count AS exec_count, 
    LEFT([sql].[text], 80) as [plan_text]
    from sys.dm_exec_cached_plans p
    outer apply sys.dm_exec_sql_text (p.plan_handle) sql
    join sys.dm_exec_query_stats stats ON stats.plan_handle = p.plan_handle
    GO
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • I just restored my 24 inch imac and it seems to be running MUCH slower than before. Any Ideas why? thanks in advance for your help!

    I have erased and restored my 24 inch Intel iMac. I have upgraded to the last version of X os. My system is running WAY slower than it was before. Even opening windows seems to lag and the spinning wheel come up for everything. Every task is slow, even typing this! lol
    Here are my specs:
    Model Name:          iMac
      Model Identifier:          iMac8,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          2.8 GHz
      Number Of Processors:          1
      Total Number Of Cores:          2
      L2 Cache:          6 MB
      Memory:          4 GB
      Bus Speed:          1.07 GHz
      Boot ROM Version:          IM81.00C1.B00
      SMC Version (system):          1.30f1
    Any ideas would be helpful. Is this a hardware issue?
    Thanks!

    Matt:
    Thanks for the update. It is good to know that the maintenance procedures helped. Regular maintenance and a good backup are key to computer security. Gulliver's article has a suggested schedule. Dr. Smoke's FAQ on Backup and Recovery has excellent information and advice. I part company with him on his insistence on Retrospect, which I have found to be difficult to use. SuperDuper has been shown the best backup software in these tests.
    If you usually leave your computer on or asleep, it is good practice to shut down and start up in Safe Mode occausionally. I do it about once weekly.
    Good luck.
    cornelius
    Message was edited by: cornelius

  • CS6 JavaScript Running Much Slower than ActionScript

    Dear All,
    In advance of the next version of InDesign CC, which will only support HTML5 and JavaScript, I converted all of my Extension's business logic from ActionScript to JavaScript - about 20,000 lines of code.
    I am using CS6 to run my Extension, and I call my JavaScript methods from within legacy Flex/ActionScript event-handler code using this methodology:
    [Embed(source="MyJSModule1.jsx", mimeType= "application/octet-stream" )]
    private static var _myJSModule1:Class;
    [Embed(source="MyJSModule2.jsx", mimeType= "application/octet-stream" )]
    private static var _myJSModule2:Class;
    _interface = HostObject.getRoot(HostObject.extensions[0]);
    public static function Initialize()
    _interface.eval(new _myJSModule1.toString());
    _interface.eval(new _myJSModule2.toString());
    _interface.myJSMethod();
    I have found that my InDesign Extension runs about 5 times slower in JavaScript than it did in ActionScript.
    Posts I read on the web seemed to indicate that JS would only be about 30% slower.
    Would the upcoming V8-based and Node.js-supporting environment be any faster?
    I really, really need help with this.
    TIA,
    mlavie

    Hmm,
    at that project/code size you get at plenty points where things matter that would be irrelevant in smaller scripts. A few years ago I extended and re-architectured a similar project, by thorough optimizations we got an speed increase of roughly tenfold, of course partially eaten up by new features.
    For the beginning: rather than issuing 80 evals, for deployment I'd compile such an enormous pile of sources into a single file. For debugging, #include is much more fun.
    As you mention argument passing of large xml, that's one area where ExtendScript can seriously slow down. Besides you'll probably find a size limit of about 64k for the underlying XML. We used InDesign document XML for working data, while smaller configuration data was parsed into js objects as soon as possible. I wrote a JSX abstraction layer that would work on either kind of XML.
    Next problem - number of prototype slots. It definitely makes a difference if you have too much, I partitioned objects into cross-linked clusters, similar to the plugin object model (boss classes), the whole enchilada supported by an underlying framework that generated JSX collections etc. by a few declarations, roughly the equivalent to templates in other languages.
    At least you're using prototypes - one really big issue with ExtendScript is the explosion of object allocations when you apply the typical closure-based JavaScript style from web programming. Eliminating them was a very big effort in our rewrite, but also gave a pretty good improvement. At least ExtendScript can produce allocation statistics, use them. Also use them to find and eliminate circular link object leaks etc. A while ago I wrote a diff utility that extends $.summary(), InDesign Server also has some goodies.
    Have you noticed ESTK's profiler? Unfortunately it just gave up at our code size, probably it will also for yours. Instead I used an own profiler with several additions, e.g. I could apply the profiler selectively to some modules while already optimized modules were skipped. It really helps to know your candidates when management pressures for "quick wins" ... Where is most absolute computation time burnt, or what methods are invoked a couple 10000 times too often for your gut feeling. Again, eliminate dead code and thus reduce prototype/object slot count. When your central class has 100s properties and matching get/set methods, eliminating them one by one produces measurable improvements.
    Of course I also tracked down some offending statements where the same value was assigned over and over again causing severe text recomposition while nothing was actually changed ... You can only find such problems with exact measurements.
    Other areas of fun: under the hood (at C++ level) every temporary text expression is backed by an enormous aggregation "suite", there are many things you can do wrong there. For example these things just pile up and are rarely purged, therefor it has become common wisdom to do an occasional save() for lengthy scripts.
    Again at the XML side: if you do severe document XML (we did), there are some circumstances where text attributes will get lost/ignored. There are ways to speed up expressions underlying references to document XML, and so forth. To know when to rebuild the XML expressions or when they can be reused is a science for itself. Same goes for other objects, as you already mention getElements(). Sometimes it helps, sometimes it is just a waste of execution time.
    As you mention the advantage of SSDs: How frequently do you dump those jsx sources into ExtendScript? If you currently use the "main" session (is that possible for HTML extensions at all?), utilize persistent sessions instead - when you have eliminated your object leaks.
    There are plenty more optimizations, I probably should write a book - to be sold in about 5 copies. Unfortunately the strongest advice in its preface would be to not use ExtendScript/JavaScript at all for large scale projects, because they turn into a maintenance nightmare where other languages catch errors on compile time. Dependent on client preference I'd probably turn to Java or do the whole thing in C++, at increasing code size development speed will be roughly on par.

  • 1.4 version of tool runs MUCH slower than 1.3???

    Hi!! I have a desktop application that I had made using 1.3. I've now successfully upgrade to 1.4.2, however I've noticed significantly slower performance with the newer version. Has anyone else experienced this? What can be done to remedy the situation??
    Katie

    This is serious issue. The repaint capability is in the order of minute vs seconds on Microsoft platforms running the 1.4 version. This is causing serious customer issues.

  • I have cable internet but my connections have been running painfully slow, much slower than the previous 2years that i've owned the computer.  I really don't know what to troubleshoot to find the problem(unless it's with my provider)

    internet connection running very slow.  I have a cable provider.  how to troubleshoot

    This is a user-to-user technical support forum. Apple is not here. You can find contact information from Apple by using the Contact Us link at the bottom right of every page.
    iPhones do not have international warranties. The only place in which you can get Apple service on your phones would be Hong Kong. Unless you have AppleCare, neither of these phones is under warranty. It is likely that the best Apple could offer you is an out-of-warranty replacement.

  • Firefox 4.0 runs much slower than FF 3.x and hangs

    After using FF 3.x for some time, I upgraded to FF 4.0 as soon as it came out. I find that simple things, like switching tabs and reloading pages takes much more time that FF3.x. On many occasions, I've had to cancel FF and restart it. Sometimes this was multiple times a day. The worst part was using Facebook and Farmville (a Flash application). It would hang many time in a session to the point that what took less than an hour took three or more.
    I finally tracked down the FF3.6 DL and reinstalled it and I find that the problem with FF4.0 no longer happens. In fact Farmville does not hang at all.
    The interesting thing is that each version of FF has its own icon and directory, but when I have one open and try the other, a second copy of the version running opens.

    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox
    http://www.mozilla.com/en-US/firefox/all-older.html

  • I just upgraded to FF 4.0, and am overall unhappy with the app. It runs much slower than my previous version, and continually hangs...even on the Mozilla websites. I'm going to try and go back to my older version, which I loved.

    As noted in my question, FF4.0 continually hangs (Not responding) even on your website.

    http://support.mozilla.com/en-US/kb/Installing+a+previous+version+of+Firefox
    http://www.mozilla.com/en-US/firefox/all-older.html

  • LRCC is running much slower than LR5

    I just upgraded my Lightroom 5.7 stand-alone to Lightroom CC and it is much slower.  I have a good laptop that is less than three years old, with 8GB RAM and a SSD.  What's up?   Thanks in advance!

    Read this: GPU notes for Lightroom CC (2015).

  • After downloading the Firefox browser update "RadioWMPCoreGecko 5.dll" file my computer runs much slower than before. Ist there any help available?

    Information by Norton Security, that ''RadioWMPCoreGecko 5.dll'' is safe. The installation started without any hesitation and -even worse - without asking my permission although my settings require this.

    Here is a thread about a similar issue with RadioWMPGecko19.dll (no real answers)
    *[[/questions/878063]]
    *[[/questions/902381]]

  • Problem compiling PL/SQL code

    I am having problmes compiling the following piece of pl/sql
    code:
    declare
    v_servicekey services.servicekey%type;
    v_tmodelkey tmodels.tmodelkey%type;
    l_bindingid bindingtemplates.bindingid%type;
    i_rowlimit number(28);
    begin
    select bindingid
    into l_bindingid
    from
    (select b.bindingid as bindingid,
    b.bindingkey,
    nvl(b.accesspointurltype,''),
    nvl(b.accesspointurl,''),
    nvl(b.hostingredirector,''),
    b.updated
    from bindingtemplates b, services s
    where s.serviceid=b.serviceid
    and s.servicekey=v_servicekey
    and (b.bindingid in (select i.bindingid
    from instances
    i,tmodels t
    where
    t.tmodelid=i.tmodelid
    and
    t.tmodelkey=v_tmodelkey)
    or (b.hostingredirector is not
    null
    and b.hostingredirector in
    (select bindingkey
    from bindingtemplates
    where bindingid in (select i.bindingid
    from instances i,tmodels t
    where t.tmodelid = i.tmodelid
    and t.tmodelkey = v_tmodelkey))))
    order by b.updated)
    where rownum <= i_rowlimit;
    end;
    I get the compilation error
    ERROR at line 30:
    ORA-06550: line 30, column 27:
    PLS-00103: Encountered the symbol "ORDER" when expecting one of
    the following:
    ) * & = - + < / > in mod not rem with an exponent (**)
    <> or != or ~= >= <= <> and or like between group having
    intersect minus start union where connect is null is not ||
    is dangling year DAY_
    The symbol ")" was substituted for "ORDER" to continue.
    ORA-06550: line 30, column 45:
    PLS-00103: Encountered the symbol ")" when expecting one of the
    following:
    . ( , * @ % & - + ; / for mod rem an exponent (**) asc desc
    ||
    Obviously there is only one SQL and it is complaining about the
    ORDER BY clause. Please ignore the values for the host variables.
    The same SQL when run from the SQL prompt with values
    substituted for the host variables runs perfectly well. Am I
    missing something or is there a catch with Oracle PL/SQL.
    Please enlighten.
    Thanks

    see
    http://forums.oracle.com/forums/message.jsp?id=500260
    I want to know that if there is any PL/SQL commad for compiling the code?
    My problem is, I am working in an environment where we are using a Database tool named TOAD of QUEST Software. Every body can look into the code. I just want to hide this code from others. A Quick reply in this regard will be really very helpful.

Maybe you are looking for

  • Heading wraps to 2nd line, but why data of 2nd line heading appearing in next page

    Hi, Im generating a matrix report which has dynamic heading. When the heading extends the page, it wraps to next line(2nd line). But the data corresponding to the 2nd line of heading is being displayed in the next page. I wanted a solution to display

  • PO: Tax amt to be convert into local currency for government declaration

    Dear All, I have this scenario where the Company currency and Vendor currency is in USD. Because of Domestic Purchase, so Tax/VAT is incurred. For my case, because company and vendor currency are both in USD, but when declare the tax to the governmen

  • Systemctl error: Failed to get D-Bus connection

    Problem migrating server to pure systemd. Unable to start stop or restart any of my enabled services.  Every command to systemctl except enable/disable results in: "Failed to get D-Bus connection: No connection to service manager." I dunno why enable

  • Tags/keywords not recognized when importing photos

    I am using Lightroom 1.3.1 and I am trying to set up a new catalog of all of my personal photos. I previously had used Adobe Photoshop Elements 5, then more recently Windows Live Photo Gallery to do all of my organization and tagging. Before making t

  • Unable to uninstall FP version 7

    OS; Windows XP Home Edition Version 2002 Service Pack 3, 32-bits Web Browser: Both Firefox and Internet Explorer Current version of Flash Player: 7, it seems I had installed Macromedia Flash Player version 7 a long time ago, and with a huge lack of f