Efficient way to read through big explain plan and genterate html explain plan for sql id's executed in past

Hi,
I have a sql which is recently having a performance problems in Production. I have generated a explain plan for it trying to find out what it is doing but plan itself is close to 1000 lines. I want to check if there is any efficient way to go through big plan like this one and quickly find the damaging areas..
2) I also wanted to know if there is way to generate explain plans in HTML format which executed in past and have entry in dba_hist_sqltext.
3) I also have two sql_monitor reports which I want to compare. is there any efficient way to do it as well?
Please share your thoughts!
Thanks in advance!
Regards,
Suman-

Hi,
I suggest you can try running sql advisor on the query maybe something fruitful comes up
http://www.oracle-base.com/articles/11g/sql-access-advisor-11gr1.php
I am not sure about the explain plan being printed in html format but
You may also want to try the sqlhistory.sql query from below page
http://evdbt.com/scripts/
I have used it many times to check on executions and explain plans which may have changed over the period
I have faced it many times , the query picks up a bad explain plan and performs poorly

Similar Messages

  • What is the best, most efficient way to read a .xls File and create a pipe-delimited .csv File?

    What is the best and most efficient way to read a .xls File and create a pipe-delimited .csv File?
    Thanks in advance for your review and am hopeful for a reply.
    ITBobbyP85

    You should have no trouble doing this in SSIS. Simply add a data flow with connection managers to an existing .xls file (excel connection manager) and a new .csv file (flat file). Add a source to the xls and destination to the csv, and set the destination
    csv parameter "delay validation" to true. Use an expression to define the name of the new .csv file.
    In the flat file connection manager, set the column delimiter to the pipe character.

  • Efficient way to read CLOB data

    Hello All,
    We have a stored procedure in oracle with CLOB out parameter, when this is executed from java the stored proc is executed fast but reading data from clob datatype using 'subString' functionality takes more time (approx 6sec for 540kb data).
    Could someone please suggest what is the efficient way to read data from Clob (We need to read data form clob and write into a file).
    Thanks & Regards,
    Prashant,

    Hi,
    you can try buffered reading / writing the data, it usually speeds the process up.
    See example here:
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/LOBSample.java.html

  • Reading through a text file and then sorting

    I'm having a lot of problems with this.
    I have to read through a text file and I have to split the string up so that it is seperated into individual tokens. A line from the text file looks like this. addEvent(new Bell(tm + 9000)). I have to grab the addEvent, new, Bell, tm and 9000 and store it in a linkedlist. After reading through the whole text file I have to sort the the linked list based on the number. ie: 9000. Is there any way to do this? I currently break up the text file using a StringTokenizer object but then i am uncertain on how to add it to a linked list and then sort each line based on the number. Any help would be appreciated.
    Joe

    Sorry to bother you Ben but I just can't get my head wrapped around this. Here is exactly what I have to do:
    After reading, Events must be stored in the EventSet according to the time they are to occur. Assume that no time number is more than 8 digits long. Restart() must be able to deal appropriately with any order of the Events. To accomplish this have Restart() save the relevant Event information in an LinkedList of strings and sort the Events by time before adding each event to EventSet. Use the <list>.add() to set up your linked list. This is shown in c09:List1.java and Collections.sort(<list>) shown in c09:ListSortSearch. Modify the Bell() to output a single "Bing!". When you read in a Bell event generate the appropriate number of Bell events as indicated by rings. These must be set to the correct times. This is an alternative to generating the new Bell events within Bell(). It will allow them be sorted into their correct time sequence. At this point the output of the program should be identical the original program.
    After the intitial start, when restarting Restart() must provide to the user the option to recreate the EventSet from the linked list or read in a new file (supplied by the user). This must be achieved by prompting the user at the console. Please also allow the user the option to quit the program at this stage.
    Main Program Code:
    public class GreenhouseControls extends Controller
    private boolean light = false;
    private boolean water = false;
    private String thermostat = "Day";
    private boolean fans = false;
         private class FansOn extends Event
              public FansOn(long eventTime)
                   super(eventTime);
              public void action()
              // Put hardware control code here to
              // physically turn on the Fans.
              fans = true;
              public String description()
                   return "Fan is On";
         private class FansOff extends Event
              public FansOff(long eventTime)
                   super(eventTime);
              public void action()
              // Put hardware control code here to
              // physically turn off the Fans.
              fans = false;
              public String description()
                   return "Fans are Off";
         private class LightOn extends Event
              public LightOn(long eventTime)
                   super(eventTime);
              public void action()
                   // Put hardware control code here to
                   // physically turn on the light.
                   light = true;
              public String description()
                   return "Light is on";
         private class LightOff extends Event
              public LightOff(long eventTime)
                   super(eventTime);
              public void action()
                   // Put hardware control code here to
                   // physically turn off the light.
                   light = false;
              public String description()
                   return "Light is off";
         private class WaterOn extends Event
              public WaterOn(long eventTime)
                   super(eventTime);
              public void action()
                   // Put hardware control code here
                   water = true;
              public String description()
                   return "Greenhouse water is on";
         private class WaterOff extends Event
              public WaterOff(long eventTime)
                   super(eventTime);
              public void action()
                   // Put hardware control code here
                   water = false;
              public String description()
                   return "Greenhouse water is off";
         private class ThermostatNight extends Event
              public ThermostatNight(long eventTime)
                   super(eventTime);
              public void action()
                   // Put hardware control code here
                   thermostat = "Night";
              public String description()
                   return "Thermostat on night setting";
         private class ThermostatDay extends Event
              public ThermostatDay(long eventTime)
                   super(eventTime);
              public void action()
                   // Put hardware control code here
                   thermostat = "Day";
              public String description()
                   return "Thermostat on day setting";
         // An example of an action() that inserts a
         // new one of itself into the event list:
         private int rings;
         private class Bell extends Event
              public Bell(long eventTime)
                   super(eventTime);
              public void action()
                   // Ring every 2 seconds, 'rings' times:
                   System.out.println("Bing!");
                   if(--rings > 0)
              addEvent(new Bell(System.currentTimeMillis() + 2000));
              public String description()
                   return "Ring bell";
         private class Restart extends Event
              public Restart(long eventTime)
                   super(eventTime);
              public void action()      
                   long tm = System.currentTimeMillis();
                   // Instead of hard-wiring, you could parse
                   // configuration information from a text
                   // file here:
              try
              BufferedReader in = new BufferedReader(new FileReader("Event Config.txt"));
              String str;
                   String[] l1 = new String[5];
                   LinkedList l2 = new LinkedList();
              while((str = in.readLine()) != null )
                        StringTokenizer st = new StringTokenizer(str, "(+); ");
                        int nIndex = 0;
                        while (st.hasMoreTokens())
                             l1[nIndex] = st.nextToken();
                        //System.out.println(st.nextToken());
                             nIndex++;
                        l2.add(l1);
                   String[] s1 = (String[])l2.get(1);
                   for(int i = 0; i < s1.length; i++)
                        System.out.println(s1);
                   Comparator comp = s1[4];
                   Collections.sort(l2, comp);
              in.close();
              catch (IOException e)
    rings = 5;
    addEvent(new ThermostatNight(tm));
    addEvent(new LightOn(tm + 1000));
    addEvent(new LightOff(tm + 2000));
    addEvent(new WaterOn(tm + 3000));
    addEvent(new WaterOff(tm + 8000));
    addEvent(new Bell(tm + 9000));
    addEvent(new ThermostatDay(tm + 10000));
    // Can even add a Restart object!
    addEvent(new Restart(tm + 20000));*/
    public String description() {
    return "Restarting system";
    public static void main(String[] args) {
    GreenhouseControls gc =
    new GreenhouseControls();
    long tm = System.currentTimeMillis();
    gc.addEvent(gc.new Restart(tm));
    gc.run();
    } ///:~
    Examples File:
    addEvent(new ThermostatNight(tm));
    addEvent(new Bell(tm + 9000));
    addEvent(new Restart(tm + 20000));
    addEvent(new LightOn(tm + 1000));
    addEvent(new WaterOn(tm + 3000));
    rings = 5;
    addEvent(new FansOn(tm + 4000));
    addEvent(new LightOff(tm + 2000));
    addEvent(new FansOff(tm + 6000));
    addEvent(new WaterOff(tm + 8000));
    addEvent(new WindowMalfunction(tm + 15000));
    addEvent(new ThermostatDay(tm + 10000));
    EventSet.java Code:
    // This is just a way to hold Event objects.
    class EventSet {
    private Event[] events = new Event[100];
    private int index = 0;
    private int next = 0;
    public void add(Event e) {
    if(index >= events.length)
    return; // (In real life, throw exception)
    events[index++] = e;
    public Event getNext() {
    boolean looped = false;
    int start = next;
    do {
    next = (next + 1) % events.length;
    // See if it has looped to the beginning:
    if(start == next) looped = true;
    // If it loops past start, the list
    // is empty:
    if((next == (start + 1) % events.length)
    && looped)
    return null;
    } while(events[next] == null);
    return events[next];
    public void removeCurrent() {
    events[next] = null;
    public class Controller {
    private EventSet es = new EventSet();
    public void addEvent(Event c) { es.add(c); }
    public void run() {
    Event e;
    while((e = es.getNext()) != null) {
    if(e.ready()) {
    e.action();
    System.out.println(e.description());
    es.removeCurrent();
    } ///:~
    Event.java Code
    abstract public class Event {
    private long evtTime;
    public Event(long eventTime) {
    evtTime = eventTime;
    public boolean ready() {
    return System.currentTimeMillis() >= evtTime;
    abstract public void action();
    abstract public String description();
    } ///:~
    Is this problem easier than I think it is? I just don't know what to add to the linkedList. A LinkedList within a linkedList? I find this problem pretty difficult. Any help is muchly appreciated.
    Joe

  • I´d like to cancel my big CC plan and switch to photo plan. I need Ohotoshop, Lightromm and Acrobat, the rest are obsolete to me

    I´d like to cancel my big CC plan and switch to photo plan. I need Ohotoshop, Lightromm and Acrobat, the rest are obsolete to me

    Hi Tore,
    You can follow the article: Cancel your membership or subscription | Creative Cloud to cancel your subscription.
    Let us know if you still need any help with that.
    Thanks,
    Ratandeep Arora

  • I had ordered a photo book print two years back. I want to reorder the same book again now. However, I have lost the album project in iphoto. Is there any way to see my print order history and reorder the same book for print ?

    I had ordered a photo book print two years back. I want to reorder the same book again now. However, I have lost the album project/photos from iphoto.
    Is there any way to see my print order history and reorder the same book for print ?

    No.  Apple only keeps the pdf file for a book for 30 days.  Without the library and book project you won't be able to reorder the same book.
    Even though the horse is out of the barn the following tutorial might be of help for future books, i.e. create a new library for each book): iP08 - Archiving an iPhoto Book for Editing and/or Ordering at a Later Date
    OT

  • Dont have a passcode. went through the recovery process and ipad is still asking for passcode?

    dont have a passcode. went through the recovery process and ipad is still asking for passcode?

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • Most efficient way to loop through similarly named fields?

    Hi,
    I have a 5 page document with each page containing appx. 50 similarly named fields.    E.g. Viol1Num, Viol2Num, Vio3Num ...  Viol50Num.
    I am looking for an efficient way of programming a loop to look at each field in Javascript so I can do some manipulations in those fields on what the user entered.
    In FormCalc I've previously used the 'foreach' function similar to:
    foreach (Field1, Field2, Field3.....Field50) do
         'BLAH'
    endfor
    however, that gets really lengthy, especially when dealing with subsequent pages where I have to start adding 'topmostSubform.Page2.' in front of each field name so that I can access from the first page all of the fields on subsequent pages.  Also, I need to do this in Javascript, not FormCalc.
    For example, in JS I am using this loop to mark all fields as read only:
    for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {
    var oFields = xfa.layout.pageContent(nPageCount, "field");
    var nNodesLength = oFields.length;
    for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
    oFields.item(nNodeCount).access = "readOnly";
    How could I do something similar to that so I could look through each field and perform actions on it without having to list out every single field name?
    I tried altering that to look at fields instead of field properties, but I couldn't get it to run.
    Thanks.

    I have solved my issue.   It took some battling in javascript using xfa.resolveNode.
    I have 5 pages, each consisting of a series of 60 fields named Viol1Num, Viol2Num, Viol3Num .... Viol60Num.
    If when this javascript runs, it detects a blank field, then insert a '3' into it.
    The below is the javascript which runs for the second page of this document.
    while (LoopCounter < 61) {
    if ((LoopCounter != 21) && (LoopCounter != 22)) {
    if((xfa.resolveNode("topmostSubform.Page2.Viol" + LoopCounter + "Num").rawValue == null) | (xfa.resolveNode("topmostSubform.Page2.Viol" + LoopCounter + "Num").rawValue == "")) {
    xfa.resolveNode("topmostSubform.Page2.Viol" + LoopCounter + "Num").rawValue = 3;
    LoopCounter = LoopCounter + 1

  • Capacity requirement for long term planning and make to order planning

    hello,
    anybody please guide me.
    my client using make to order scenarion and we are doing regulaly MRP run is MD50 with refernce to sales order.
    sales orders planning will follow for 2 to 3 months.
    at the same time my client wants to do long term planning also. to analize the capacity.
    for that he is creatind planning scenario and multi level planning with MS02 also.
    But the problem is when they are checking capacity requirement in cm38 it is showing only planning scenario load only. my client wants existing load and longterm planning load also. so they can plan the planning is sutibale in existing plan.
    so how can i get both plan in CM 38or is there any other T.code to get that data.
    please suggest me
    Thanks & Regards
    Bhakta

    Hi Pierre and Rajesh,
    When we create the simulation version, you have the possibility to choose the short-term planning. My point of view is, you can use the LTP fonction to do your scheduling for ex the next 3 months.
    I think it's what Pierre did. Am I right ?
    between to scheduling scenario to deliver my customer. With the simulation mode I can do my scheduling + use the MRP simulation to check if the raw material are available or not. Then use the MD04 to do the comparaison (or MS04 to compare between 2 scenario).
    But I found 2 problems :
    First : I don't find the parameters to show in the graphic MFS0, the planed fix order (I can only see the process order)
    Second : When my scheduling is finished, I want to update my operational planning with the simulation version. But I don't want to do article by article : when you have 400 references (raw mat, packaging, finish goods)  it's impossible (same issue like Pierre)
    Have you found a solution for this 2 points ?

  • I have read through the terms of Apple care extended protection plan but i need clarification.

    I just read some ipad horror stories about the glass getting cracked. I am not too sure how Tough these babies are, but before i splurge on an extended protection plan for my practically brand new ipad2, i would like clarification as to whether accidental coverage is implied; say for example if the glass were to get scratched, or cracked; under the extended service plan, iit be a covered repair, parts and labor ?
    Thanks for readin'
    Rebecca

    AppleCare is a warranty extension and covers manufacturing defects. It is not insurance and will not cover user-caused damage, such as scratching or cracking of the glass (unless the crack was determined to be due to a defect in manufacturing, not the iPad being dropped or impacted).
    You can find more information including lists to Frequently Asked Questions and the precise Terms and Conditions here:
    http://www.apple.com/support/products/ipod.html
    Regards.

  • Is there a way to disable touch on the Helix and get a power management for battery cycles?

    As the title describes.
    I've been drawing a fair bit on the Helix using photoshop but what to find a way to disable touch. I used to be able to do it on my x220t through the control panel>isd tablet settings. Windows 8 doesn't have that option. Please don't mention palm rejection as it doesn't always work.
    Also I'd live to know if there is a battery gauge to show the battery cycle of the helix. I know the battery is in good condition. What i'd like to know is the cycles of both batteries.

    So I have found a temp work-around that does the deed.  I have been using a lot of autodesk sketch, and its bomb if you don't have to worry about your hand touching the screen while you sketch.  Here is how I have been doing it.
    WIN+X >> Device Manager >> Human Interface Devices >> 
    Under this section you will find three USB Drivers installed.  I found that if I desable the second USB Driver, then the touch screen stops working, but the Digitizer still works 100%.  Just re-enable when you want to use the touch again.  I really wish Lenovo had software to take care of this out of the box.  But as I said, It works for the time being.

  • Difference between Standard EBS Rapid Planning and stand-alone  Rapid Plan

    Hello All,
    We are currently working on installing ASCP and Rapid Planning as part of client R12 implementation.
    As part of the installation, we identified VCP can be installed in 2 different ways
    1) As a Standard EBS module
    2) Standalone application on top of Web-logic.
    Can anyone please confirm what could be the pros/cons if we go with option 1 and option 2 ?
    Which option should be the best if we are planing to go RP with cloud ?
    Appreciate your inputs if possible.
    Cheers,
    Krishna

    Rapid planning always requires an EBS installation.
    The difference between a standard EBS and standalone is that
    1. a standard RP install (actually an ASCP install) is linked to an EBS source instance (ie data is collected from there)
    2. a standalone install is where you install Oracle Applications 12.1 (ASCP installation) , only configure the ASCP setup (since RP requires certain ASCP functionality like collections/patches/profile settings). Data here is collected through legacy collections (ie coming from a non-EBS source)
    There is no way to run RP just on weblogic
    You mention R12, but bear in mind that RP only works on 12.1.x.
    In your case if you have

  • Difference between Creative Cloud Photography Plan and Adobe Photoshop CC plan?

    Hi all, really would appreciate if somebody could explain the difference
    Both include Photoshop right, so why is the latter plan more expensive? Thanks very much!

    Yes, thank you for your reply. All set for now.
    Thank you for contacting us,
    Team Reign of Iron
    [email protected]
    www.reignofiron.com | facebook.com/reignofironusa | instagram.com/reignofironusa | twitter.com/reignofironusa
    “ChallengeYourself”

  • Want to get off family plan and go to individual plan

    I am on a family plan with an edge agreement and for personal reasons would like to be on my own. My contract is up in June of this year. What are the steps to doing so? If I do it before June, how much will it cost me? Thanks for the help!!

    Jnny2581,
    Being able to establish your own account is always nice to be able to do. Since you are on our Edge program, you will have to complete that agreement before you are able to make this change. Assuming, you want to keep your number that is.
    ErinW_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • I want to cancel the photography plan and purchase the student plan

    I couldn't find plan cancelation.

    Hi,
    Please follow the following guidelines to cancel your subscription: Cancel your membership or subscription | Creative Cloud
    Please let us know for any queries while using it.
    Thanks,
    Ratandeep Arora

Maybe you are looking for

  • How do I change the e-mail address associated with Facetime on my iPhone?

    On my iPhone, under Settings -> Facetime, if I switch this to "on", I am immediately prompted to provide a password assocaited to an old e-mail address. How do I change this e-mail address? My app store account is correct, and I don't think this old

  • How to do Enhancements in Reporting & What is Role and How to create Roles

    Hi All, Can any one tell How to do Enhancements in Reporting, and also What is Role and How to create Roles in Reporting? Plz reply back me on [email protected] Regards, Kiran

  • MAIL TO FILE SCENARIO--3 MAILINBOX configured in the same Outlook

    Hi All, I have  a  below requirement : A vendor is sending an e-mail with attached an invoice (PDF, TIF, etc) to a common Outlook (But can have several mailboxes: eg abc@xxx. com ; xyz@xxx .com) When a new email arrives in these inboxes (Note : Same

  • Starter Templates for fluid grid layouts.

    Hello, I am watching the video (Learn Dw CC video by David Powers.)  In the video and in the version of Dw CC he is using there are 6 templates for a fluid grid layout but I see none in my version of Dreamweaver CC and I have the latest version? Mayb

  • Company code currency

    Hi experts, I try to post a invoice f-02 i am getting a error : Local currency for company code MG00 cannot be completely maintained I checked currency exchange rate, it also mentioned with regards mohd ghouse