How to find why the plan amended

We are using Oracle 11.2.0.3. In our production system, one of the SQL started using different plan_hash_value afternoon today. This increase has elapsed time to 1 + minutes rather than the second. There was no change of system at the time. After rinsing shared_pool, the query takes again an optimal plan.

V $ sql_shared_cursor, I have found no difference between the two cursor:

Right when the plan has been slow:

child cursor 0 during the performance was slow:

< ChildNode > < ChildNumber > 0 < / ChildNumber > < ID > 34 < /ID > < reason > Rolling Invalidate window Exceeded (3) < / reason > < size > 2 x 4 < / size > < invalidation_window > 1452265834 < / invalidation_window > < ksugctm > 1452265953 < / ksugctm > < / ChildNode > < ChildNode > < ChildNumber > 0 < / ChildNumber > < ID > 34 < /ID > < reason > Rolling Invalidate window Exceeded) (3) < / reason > < size > 2 x 4 < / size > < invalidation_window > 1451915636 < / invalidation_window > < ksugctm > 1451915677 < / ksugctm > < / ChildNode > < ChildNode > < ChildNumber > 0 < / ChildNumber > < ID > 34 < /ID > < reason > Rolling Invalidate window Exceeded (2) < / reason > < size > 0 x 0 < / size > < details > already_processed < / details > < / ChildNode >

v$ sql_shared_cursor. Reason when the plan was good:

< ChildNode > < ChildNumber > 1 < / ChildNumber > < ID > 34 < /ID > < reason > Rolling Invalidate window Exceeded (3) < / reason > < size > 2 x 4 < / size > < invalidation_window > 1452529290 < / invalidation_window > < ksugctm > 1452529356 < / ksugctm > < / ChildNode > < ChildNode > < ChildNumber > 1 < / ChildNumber > < ID > 34 < /ID > < reason > Rolling Invalidate window Exceeded) (3) < / reason > < size > 2 x 4 < / size > < invalidation_window > 1451923704 < / invalidation_window > < ksugctm > 1451923763 < / ksugctm > < / ChildNode >

Y at - it other reviews or newspapers that I can check to find out why an expensive plan chose?

Is there an easy way that I can reproduce the expensive plan in lower environment.

Thank you.

This isn't a detail, I looked closely (yet), but it seems to me that if the information contained in the reason said you that the cursor was invalidated and re-optimized because someone (or automatic labor) had collected stats with the option "disable-online auto" and the window for rolling invalidation had finally expired. This suggests that (a) you is perhaps no chance with the particular game of the variable bind used immediately after the cursor has been invalidated or (b) your collection of statistics came to use a (particularly relevant for histograms) unlucky sample and your plans could change semi randomly each time you collect statistics.

If it's (b) then rinse the shared pool and forcing re-optimizing would probably give you the wrong plan again.

If it is (a) then rinse the shared pool (after throwing a bind variable) will allow you to link different test values and see if you get different plans.

Step 1: get some peeked binds to both good and bad

Solution temporary possible (if it's unlucky stats) - you could draw the previous set of stats history back to whatever the table in the query have their stats together very recently.  (Invalidation_window entry is PROBABLY the time-out period of cancellation in seconds since January 1, 1970 GMT; this, I think, will be 5 hours after the time of collecting stats (local) or possibly time to collecting statistics - I guess that 5 hours, but maybe it's that the invalidation of rolling decided to strike these sliders only one or two minutes after collection - but I don't know exactly what these numbers and why there are) differences of days between the two sliders).

Concerning

Jonathan Lewis

Tags: Database

Similar Questions

  • How to find why the computer is slow to start?

    My windows is very slow to start the system when you turn on the computer. What can I do to remedy this situation short recovery windows itself? I tried system restore, that it has only gotten worse. I have also come it HP themselves.

    Type msconfig in the start search box. Under the Startup tab, clear some of the
    Automatic programs from.
     
    Also, see http://support.microsoft.com/gp/mats#tab4 and look
    Common system maintenance tasks
    Problems with the overall speed of the system and performance
     
    --
    ..
    --
    "Gerry Andrews" wrote in message
    News: e1865f00-b0ec-4e38-bf96-5c416e7c3413...
    > My Windows is very slow to start the system when you turn on the computer. What
    > I can do to remedy this situation short of recovery windows itself? I have
    > have already tried the just system restore, it got worse. I also just got it
    > back to HP themselves.
    >
     
     
  • How to find all the my post anywhere in the forum?

    Desktop HP Pavilion Elite HPE - 110 t... Operating system: Windows 7 Home Premium

    .

    Several months ago (maybe even a couple of years), I discovered that backup/restore are not created.  At this time I posted a question here.  Which lead to a very long series of back & suite assignments between myself & a answering machine (name?) & Finally I planned a daily task to create backup/restore points.  I saved the instructions into a Word document on my computer, but now I can't find them.

    .

    I just found out that there is still no restore point, even though the Task Scheduler shows that he ran this morning @ 02:00.

    .

    I just searched (I thought that all the forums here) for my username (jarhtmd) & only found 4 son, none of whom was what I was looking for.

    .

    How to find all the my post anywhere in the forum?

    Hello:

    Click on your user name to access your user name page.

    Then click recent posts by jarhtmd. Click on view all.

    Maybe it's the post you were talking about.

    http://h30434.www3.HP.com/T5/desktop-operating-systems/scheduling-system-protection-backup-restore-points/m-p/647911#M32431

    Paul

  • don't know how to find out the server for my email information.

    I had to reinstall Windows Vista (my computer was a mess), and now I don't know how to get information on the mail server

    I don't know how to find out the server information I need

    to set up my email again.

    Also, my pictures 'lost' since I have done this?

    Hello

    Contact your ISP (Internet Service Provider); They provide your broadband / dial connection.

    Ask them to:

    1. your username with them

    2. your password with them.

    3 incoming mail POP3 server.

    4. the outgoing mail SMTP server

    All the settings that you need to come from them, not Microsoft; and they are usually happy to help you set up your e-mail program.

    You can use this guide to set up Windows Mail, too:

    http://Windows.Microsoft.com/en-us/Windows-Vista/Windows-mail-setting-up-an-account-from-start-to-finish

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    A relocation normally wipes the hard clean everything, as part of the resettlement process.

    Two things you can try:

    1. find a windows.old folder (depends how you reinstalled Vista)

    "How to restore your personal files after performing an installation of Windows Vista or Windows 7"

    http://support.Microsoft.com/kb/932912

    2. This program has had good results in data recovery in circumstances similar to yours.

    http://www.Piriform.com/Recuva

    See you soon.

  • How to find all the old files and documents on the hard drive

    Original title: how to find a file

    How to find all THE old files and documents on the hard drive

    Hello

    -Are the old hidden files?

    I recommend you follow the steps in these articles for help.

    Show hidden files
    Find a file or folder

  • How to find all the table names in all modules in EBS R12?

    How to find all the table names of all the modules in EBS R12?

    In addition, you can go to http://etrm.oracle.com, you select the version of the EBS, select "FND Data" or "S/n data", select the Type of the object TABLE and you will get all the tables of EBS in module.

  • How can I get the plan in Jamaica

    How can I get the plan in Jamaica

    I don't know if there is workaround, but this WILL wire _might_ help

    http://Forum.luminous-landscape.com/index.php?topic=78815.0

  • How to find all the OBIEE ports in GNU / Linux

    How to find all the OBIEE ports in GNU / Linux?

    Thank you
    Jay.

    Hi Jay,.

    Did you check that?

    http://blog.Trivadis.com/b/andreasnobbmann/archive/2009/02/26/ports-used-in-OBIEE.aspx

    Rgds,
    DpKa

  • How to find if the Oracle client is installed or the server is installed.

    Hello

    How to find if the Oracle client software is installed or server software is installed on a linux machine.

    Thank you.

    Check the output of 'opatch lsinventory.

    If its database, the output would be as follows.

    Installed products of higher level (1):

    Oracle Database 10g 10.2.0.1.0

    For the customer, it would be

    Installed products of higher level (1):

    Client Oracle 11.2.0.1.0

  • How to find no work plans and the lines of a doc. ?

    Hello

    could someone tell me how to count the number of work plans and existing lines in the document?

    the CS4 API can do?

    I couldn't find all the suites do.

    Please help I'm stuck.

    Thank you

    DeepAlone.

    The number of work plans is easy: AICropAreaSuite::GetCount() in AICropArea.h. The number of lines? It's more complicated, since there is no ownership of it. You figure, however, using the methods of AICropArea to join the rectangles (see struct above) of each work plan (or "box frame" as they are called in the nomenclature of the CS4 API). There is no guarantee that they are in lines, of course, since they can be moved. You can take a stab but looking at the top & bottom and see if a bunch of them line up; which would give you meaning to all the lines are there is they are in lines.

  • IPhone 6: how to find if the call is completed?

    Greetings,

    I often participate in the telephone conference call bridge company. When the Conference ends, I have a problem to find my phone if he "hung his handset. A few times already, I found that the connection has changed its status to "pending" instead of the end. The IPhone has allowed me to launch another appeal; incoming calls received the signal "busy", and the telecommunications operator received their money for a very long connection. I was unable to find any icon on the screen warning me that there is a call in progress. How to find the phone that there any telephone connection active or not? IPhone 6 s, software 9.3.2

    Thanks, Marek

    If you are on an active call, the bar at the top of the phone screen will be green if you are on the home screen or most other applications. Click on this green bar takes back you to the Dialer screen.

    If you have some kind of difficulty to end the call by pressing the button on the screen, try pressing the power button. Which will also end the call.

  • How to find outside the prasent weekend and beginning of the week

    How can I find out the date of early this week, but also the end of the week for one week to present?

    Say for example:

    Today date is 1 MS, so I want the beginning of this week is August 31, 2009 and the end of week date is 6 eme Sep 2009 how can I slove this problem?

    Please answer as soon as possible...

    Thanks and greetings

    -----

    Jitendra.B

    int d, d1;
    String dat = «;»
    Date jj = new Date();
    Date dt = new Date (dd.getTime ());
    Calendar c = Calendar.getInstance ();
    c.setTime (dt);
    d = c.get (Calendar.DAY_OF_WEEK);
    D1 = c.get (Calendar.DAY_OF_MONTH);
    int start; end;
    Switch (d)
    {
       
        
        
        
    case Calendar.MONDAY: start = 1; end = 7
    break;
    case Calendar.TUESDAY: start = 2; end = 7
    break;
    case Calendar.WEDNESDAY: start = 3; end = 7
    break;
    case Calendar.THURSDAY: start = 4; end = 7
    break;
    case Calendar.FRIDAY: start = 5; end = 7
    break;
    case Calendar.SATURDAY: start = 6; end = 7
    break;
    case Calendar.SUNDAY: start = 7; end = 7
    break;
           
    }

    now u came to know the day of the week... now u easily discovered the beginning and end date... do not forget the day startr of the week is Sunday...

    Kind regards

    bbbbdeveloper

  • How to find out the name of the current day

    Hello

    How to find the name of OBIEE11g today.

    Use the name of DAY formula

    ex: day of the WEEK (the "Closing Date") or DAYNAME (current_date)

    Score pls correct/useful also to your old posts!

    If account information is not help pls update with your solution for these positions

    How variable to calculate n SUP...
    Re: Problem with top N...
    Problem with Dyamic varibles.
    How to create the Global filter...

    Published by: Srini VIEREN on 17 December 2012 10:05

  • How to find what the role application role

    Hello IDM experts, when a request for a role is made by an applicant, inside the composite custom for the approval process, I'm going to get the ID of the application using the API of the IOM. Now, using this ID of the application, how can I get the name of the requested role?

    I know we can get the beneficiary using the IOM APIs, and then we can get a role object. Is there a simpler way without going through the notion of beneficiary? In my case, the plaintiff will ask only a single role both in the query (to put it simply).

    Another thing is, there is method getAttribute() on role class. But the guide API does not say what are these various attributes. Y at - it a guide who talk to us of these various attributes?

    Thank you for your great help.

    Published by: Jyothi on November 4, 2012 19:11

    You will get the role name of the load itself. In the payload as you get the requestId, in the same way, you will have the requested object. In your case since you ask for the role, the payload will contain the name of the role. What to do create an application role and then check the application of the EM. EM, you can find the XML payload, and there you can see the data sent in the payload.
    I donot have an environment running for role now, but I think that the payload contains all the attributes of the same role. So you can directly read the attribute "owned by" off the coast of the payload and assigned to this user. If this isn't the case, you can use the API of the IOM to connect to IOM and read a list of choices that contains this mapping or simply add _APPROVERS as the name of the approver group.

    -Marie

  • How to find if the DEFAULT VALUE of the COLUMN is stored as metadata?

    Hello
    I am using Oracle 11 g enhanced functionality add a COLUMN. Adding new columns with the DEFAULT values and unconstrained NULL is no longer requires that the default value in all existing records.
    Sometimes, we change DB columns not NULL with default with the DEFAULT value null. This operation "materialize" the default for the column.
    Y at - it an easy way (see Dictionary) how to find the default value of the COLUMN is stored as metadata or 'materializes '?
    Thank you. Filip

    Version of Oracle RDBMS: Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Look at the table SYS COL$. He has a column called PROPERTY.

    It will have the magic number 1073741824 for columns that have been added by using this new feature...

Maybe you are looking for