Dbms_xplan.display_awr display more than one plan

Hi,
There are times when running dbms_xplan.display_awr , shows more than one execution plan.
How can i know which of the plans is the most recent ?
For example :
SYS@qa> SELECT * FROM table(dbms_xplan.display_awr('0gtqfjcypx66z'));
Show two diffrenets plan :
Plan hash value: 3366355658
Plan hash value: 2273523394
Thanks

It is more than likely both plan will be relevant. A single sql_id does not mean that there is a single plan active.
Below is a very simple testcase that highlights the same sql_id with 2 different plans being used at the same time. Even though the same namespace is shared the underlying objects are different.
There are a lot of other reasons for a child cursor to not be shared apart from the query be executed in different schema.
-- 1. Create 2 users with identical tables but different data. 1 table has an index.
sqlplus / as sysdba
grant dba to test1 identified by test;
grant dba to test2 identified by test;
create table test1.x (x varchar2(1));
create table test2.x (x varchar2(1));
declare
i number;
begin
for i in 1..125000 loop
insert into test1.x values ('N');
end loop;
insert into test1.x values ('Y');
commit;
end;
insert into test2.x values('T');
create index test1.x_idx on test1.x(x);
exec dbms_stats.gather_table_stats('TEST1','X', method_opt=>'for all columns size skewonly');
exec dbms_stats.gather_table_stats('TEST2','X');
alter system flush shared_pool;
-- Connect as the first user and observe the results
conn test1/test
select * from x where x='Y';
SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR);
alter session set nls_date_format='DD-MON-YYYY:HH24:MI:SS';
select sql_id, PLAN_HASH_VALUE,CHILD_NUMBER,LOADS,USERS_EXECUTING,FIRST_LOAD_TIME,LAST_ACTIVE_TIME, OPEN_VERSIONS from v$sql where sql_text like 'select * from x%';
pause
-- Connect as the second user. See the second child cursor being created with a different plan
conn test2/test
select * from x where x='Y';
SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR);
alter session set nls_date_format='DD-MON-YYYY:HH24:MI:SS';
select sql_id, PLAN_HASH_VALUE,CHILD_NUMBER,LOADS,USERS_EXECUTING,FIRST_LOAD_TIME,LAST_ACTIVE_TIME, OPEN_VERSIONS from v$sql where sql_text like 'select * from x%';
pause
-- Now we go back to the first user and execute the query again. Notice that the last_active_time is updated again
conn test1/test
select * from x where x='Y';
SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR);
alter session set nls_date_format='DD-MON-YYYY:HH24:MI:SS';
select sql_id, PLAN_HASH_VALUE,CHILD_NUMBER,LOADS,USERS_EXECUTING,FIRST_LOAD_TIME,LAST_ACTIVE_TIME, OPEN_VERSIONS from v$sql where sql_text like 'select * from x%';

Similar Messages

  • How do  I display more than one region as a modal popup?

    Hello all!
    I have a popup that displays a report region. I now want it to display more than one region, say a report region and another report region underneath it.
    Here's the code that I currently have (and this one can popup one region):
    $.fx.speeds._default = 1000;
    $( function(){
      $('#ModalForm').dialog(
         modal: true,
         autoOpen: false,
         width: 650,
         height: 450,
         buttons:{ Calculate: function(){calculateTotal();},
                         Close: function(){closeForm();}        
    function openForm(pFoodTemplateId, pMealTypeId)
    var getone = new htmldb_Get('shiny',&APP_ID.,"APPLICATION_PROCESS=DUMMY", &APP_PAGE_ID.); // initialize get
    getone.add('P24_TEMPLATEID', pFoodTemplateId);
    getone.add('P24_MEALID', pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $('#ModalForm').dialog('open');
    function closeForm()
    {$('#ModalForm').dialog('close');}
    $(document).ready(function()
        {$('a.temppop').click(function() {openForm();});
    });The class of the button (or in my case, the link in another region that's not displayed as a popup) is temppop.
    QUESTION:_
    How do I edit my existing code, so that it can now display another region?
    The ID of the region it displays now is ModalPopup. I would like to add another region, with another ID off course. Pick any ID, as long as you can explain to me how.

    Magali wrote:
    Hello all!
    I have a popup that displays a report region. I now want it to display more than one region, say a report region and another report region underneath it.
    Here's the code that I currently have (and this one can popup one region):
    $.fx.speeds._default = 1000;
    $( function(){
    $('#ModalForm').dialog(
    modal: true,
    autoOpen: false,
    width: 650,
    height: 450,
    buttons:{ Calculate: function(){calculateTotal();},
    Close: function(){closeForm();}        
    function openForm(pFoodTemplateId, pMealTypeId)
    var getone = new htmldb_Get('shiny',&APP_ID.,"APPLICATION_PROCESS=DUMMY", &APP_PAGE_ID.); // initialize get
    getone.add('P24_TEMPLATEID', pFoodTemplateId);
    getone.add('P24_MEALID', pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $('#ModalForm').dialog('open');
    function closeForm()
    {$('#ModalForm').dialog('close');}
    $(document).ready(function()
    {$('a.temppop').click(function() {openForm();});
    });The class of the button (or in my case, the link in another region that's not displayed as a popup) is temppop.
    QUESTION:_
    How do I edit my existing code, so that it can now display another region?
    The ID of the region it displays now is ModalPopup. I would like to add another region, with another ID off course. Pick any ID, as long as you can explain to me how.First build your dialog for new ID (please replace NEWREGIONID with your region static id)
    $( function(){
    $('#NEWREGIONID').dialog(
    modal: true,
    autoOpen: false,
    width: 650,
    height: 450,
    buttons:{ Calculate: function(){calculateTotal();},
    Close: function(){closeForm();}
    And now you could open or close the dialog
    $('#NEWREGIONID').dialog('open');

  • How to display more than one documents on windows 8 desktop?

    how to display more than one documents on windows 8 desktop?

    Adobe Reader Touch doesn't show more than one file on screen and doesn't show them on the desktop. Apparently these are very old fashioned things that Microsoft doesn't think we'll want to do any more and calls them "legacy" to make them sound antiquated.
    If you want to do these things use the legacy Adobe Reader, a much more powerful and flexible app (and not obsolete in the slightest). http://get.adobe.com/reader . There are no legacy apps in the Windows App Store.

  • More than one Planning plant for a maintenance plant.?

    hi Friends, can we have more than one Planning plant for a maintenance plant.Is there any advantage or disadvantage of this condition.?

    Hi,
         You can have Maintenance Planning Plant & Maintenance Plant in any of the follwing ratios, i.e., 1:1 / 1:n / n:1. Actually in Maintenance, there can be electrical & mechanical maintenance.
              In the case of 1:1 relation, all the maintenance activities (Electrical & Mechanical) will be planned by single Maintenance Planning Plant for single Maintenance Plant.
            In case of 1:n, single maintenance planning plant will do the plaaning of maintenance activities for all the maintenance plants.
          In case of n:1, electrical activity will be planned by one Maintenance planning plant & mechanical activities by another planning plant for a single Maintenance plant.
          Defining Maintenance planning plant & maintenance plant in different relations will help us in generating different kind of reports.
    I am looking forward your reply.
    Regards,
    Maheswaran.

  • Displaying more than one display attribute in a tree component problem

    Hi,
    I have a parent table and child table, I want to display a parent table's display attribute and below that i want to display child tables two display attributes (while defining the rule for a tree compoment).
    What i'm getting is :
    I can able to display more than one "display attributes" for my parent table, but when i'm trying to implement that for my child table under my parent table. I am only geting the blank folder structure without names.
    For example:
    Parent table: Deparetment(id, name)
    child table: Employee(id, firstName, lastName)
    What i want is:
    In a Tree:-
    (Department name): software below that i want display both (firstName and LastName) stephen Fleming
    for that employee.

    Hi,
    do you use ADF ? If yes, have a look at "master table with inline detail" option when dragging the master View
    Frank

  • Displaying more than one column in TreeControl

    Hi,
    I have three tables ( LaborOperation, LaborIndex, LaborData). In TreeControl, i am displaying the following table columns,
    LaborOperation ->operationid,
    LaborIndex -> indexid,
    LaborData -> date, value.
    i want to be like this.
    + Operation Id(Single Column)
    + OperationIndex(Single Column)
    -OperationData(Multiple Column)
    I can able to display single column values in tree control by setting the nodedifinition property in tree control. i can't able to display more than one column in tree control.
    any idea about this problem
    thanks in advance.
    -Nainar

    Arun Prasath wrote:
    I want to display more than one row in a multiple columns of a single row.
    For example,
    In oracle apps, there are multiple tax lines for a single invoice. Each tax lines having their own entry in tax detail table.
    When i try to display a single invoice's details in a single row i found the difficulty.Hmm did you see the title of the forum? Oracle Database » General Questions !
    May be you want to check the Oracle Apps forum?
    Aman....

  • How to display more than one column with for each

    Hi guys,
    how to display more than one column with for each like below?
    for each
    Item1
    Item2
    Item3
    Item4
    Item5
    Item6
    Item7
    Item8
    Item9
    Item10
    End for each
    for each          
    Item1     Item2     Item3
    Item4     Item5     Item6
    Item7     Item8     Item9
    Item10          
    End for each

    Take a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
    Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
    Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
    Thanks,
    Bipuser

  • Re: More than one planned order on same day

    Dear All,
    I am getting more than one planned order for the same day in MD04 after I run MRP run. My requirement is that the planned order should get clubbed.
    My lot size is WB & 2: collective requirement setting.
    Please advice.
    Regards,
    Vivek Sharma

    Karthick,
    I am getting more than one planned order on same date.If I check any of the planned order for pegging requirements I find that the planned order has been created after clubbing all the requirements( the Raw material is being used in morethan one FG )
    Now the issue Is :
    09.06.2010     PldOrd     0019211763/STPO     13.02.2010     30     159.500
    09.06.2010     PldOrd     0019211764/STPO     18.02.2010     30     1,536
    09.06.2010     PldOrd     0019211765/STPO     25.02.2010     30     787.500
    09.06.2010     PldOrd     0019211766/STPO     11.03.2010     30     2,536.755
    09.06.2010     PldOrd     0019211767/STPO     29.03.2010     30     862.500
    09.06.2010     PldOrd     0019211768/STPO     13.04.2010     30     108.750
    09.06.2010     PldOrd     0019211769/STPO     27.04.2010     30     1,678.500
    09.06.2010     PldOrd     0019211770/STPO     30.05.2010     30     980.745
    So I dont understand how is this happening.
    Regards

  • Display more than one interactive report on a page

    Hi,
    is it possible to display more than one interactive report on a page.
    Thanks for any idea
    Norbert

    You can't display two on one page, but it is possible to have multiple conditional interactive reports. See Duncs most excellent blog:
    http://djmein.blogspot.com/2008/03/multiple-interactive-reports-on-one.html
    This is probably an unsupported approach.
    Cheers
    Shunt

  • How to create combobox to display more than one columns

    I need kind help with the following question. As the combobox includes two pieces--textbox and the combobox list. Then how to create a combo box bean, which is based on table EMP(empno number(6), ename varchar2(40)) records for example, to achieve these features:
    1) allow more than one columns to be displayed in its records list--e.g., I need to show these records:
    empno (value) ename (label)
    103 David M Baker
    104 David M Baker
    105 Kelly J Volpe
    106 Krista F Carpenter
    107 Michelle P Silverman
    The two 'David M Baker's are different employees, but unfortunately, with the same name.
    2) allow combo box list to return the column value 'empno' even though it shows both columns as above. i.e., if user picks the second record above, then the combobox list returns 104 to the textbox in the background, but the 'David M Baker' is displayed on the textbox. Of course the combobox list may return 'David M Baker' if needed when there is only one column in the list as the current standard feature.
    3)allow partial match search by typing in some letters. i.e., if user types in the textbox of the combobox letter 'K' or 'k' then the partially matched records
    105 Kelly J Volpe
    106 Krista F Carpenter
    should be automatically displayed in the combobox list, not the whole list as above; then user may double click to choose one of the two or if user continues to type in 'R' or 'r', then the uniquely matched record 'Krista F Carpenter' is displayed in the textbox and the 106 is returned to the textbox.
    4) as a bonus if it's doable, allow combobox to return values to different textboxes when its records list has more than one columns.
    The reason I need these features is that I am working on the project migrated from Microsoft Access applications to centralized Java version web application. We at beginning promised to users community that Java swing will provide all the GUI user friendly features Microsoft Access has, but now we got stucked--we ate our words and got tons of complains from our users community. This is just the most needed component I posted here. I really hope that Java would add all the default GUI user-friendly features to compete with MS since its Win95 GUI has been accepted as industry standard. And most users are used to it. They claimed that they don't know and don't care what tool you use the newly created application should be more user friendly, not the opposite.
    I would be very much appreciated if any one would help me with this item.

    Thanks for your comments. I think nobody expects Sun to write everything including special features for its components. But I do think Sun should provide at least those standard user-friendly features for the GUI components because most users have been used to the GUI user-friendly features provided by Win95 and Access/Excel applications. Then this will help us to productively create applications to beat MS applications.
    Other wise like me, to get the existing GUI features, existed in old MS Access application, for our migrated Java application, I must re-create the GUI components library first which is a big burden to me at least, for others it might be fun for coding on their own from scratch, but I have to focus on the timing of project.
    If you really can pass the request to Sun and push them move a bit, please pass these words: before Sun starts to revise them, please play around window GUI, e.g., Access/Excel applications, then plan what to do, the bottom line is to equally match or better than them in FUNCTIONALITY(Look and feel is not my focus here). Don't ignore the influence of Windows regardless of you hate it or love it, the reality is most users are so familiar with windows GUI features which are accepted as industry standard. Thus the choice is to match or better to beat them. Don't make your car by closing your door, don't assume users will like what you come out in a closed room.

  • Can you have more than one plan at a time? i.e.: After Effects CC Single App   Photography

    I can't afford to pay for the whole CC package, but I really miss Photoshop in my workflow. In all the promotional stuff, the single app plan is offered to those who only want "one or two" apps, but I'm guessing the two only applies to PS+LR
    Paying an extra £8/mo for Photoshop would be worthwhile, but It isn't immediately clear whether or not this is doable.
    If anyone has tried this, or knows an answer I'd greatly appreciate your help!
    Thanks,
    -Mat

    Yes, you may have more than one "single" subscription, with the photography special counting as a single
    Cloud Plans https://creative.adobe.com/plans
    -and subscription terms http://www.adobe.com/misc/subscription_terms.html

  • Display more than one line of text for events?

    I couldn't find this in the forum... I just recently updated to Leopard. Now when I put events in iCal, it only displays one line of text in the month calendar view. I'd really like to see the whole description of the event, even if it's two or three lines. I can't find anything in preferences that addresses this, and various searches are not yielding anything. Help?
    -mel

    Hi there.
    Usually in iCal if you want more than one line of text for timed events, resizing the window will help. Under all-day events, iCal will always show you one line of text, but if there is more space it will show you more text. So, also resizing the window for this will help to see the text.
    Take care.

  • How can I DISPLAY MORE THAN ONE ROW OF PHOTOS WHEN CREATING A BOOK?

    Can I display more than A SINGLE ROW of ohotos on the right side of the page when I am creating a photo book? I have 500 pics and this single bar is ridiculous.

    Command (right) - click on a photo in the Photo tray and select Small Photo from the contextual menu:
    This will give you two columns of photos.
    To reduce the number of photos to select from one can select only Unplaced Photos to be displayed in the tray.
    Happy Holidays

  • How to display more than one Record in a Loop

    Hi ,
    This procedure will return more than one data .
    so please tell me how can i write a loop to display all the records of a Table .
    This is my procedure :
    create or replace procedure getEmpName
    V_EMPID IN employee.EMPID%TYPE,
    V_EMPNAME OUT employee.EMPNAME%TYPE
    is
    begin
    select empname into V_EMPNAME from employee where empid='2';
    end ;
    This is my block : How to write a loop here to display all records of my Table
    declare
    v_EMPNAME EMPLOYEE.EMPNAME%TYPE;
    begin
    getEmpName(2, v_EMPNAME);
    dbms_output.put_line(v_EMPNAME);
    end

    user10503747 wrote:
    so please tell me how can i write a loop to display all the records of a Table .hi,
    given procedure will display all records of emp table...
    CREATE OR REPLACE PROCEDURE Testloop
    AS
    CURSOR test1
    IS
    SELECT EMPNO, ENAME FROM EMP;
    BEGIN
         FOR i IN test1
         LOOP
         DBMS_OUTPUT.PUT_LINE ( 'Emp - '||i.empno ||'-'||i.ename );
         END LOOP;
    END;
    Thnx
    MB

  • Displaying more than one icon in a dialog.

    How can display a dialog that contains more than one icon?

    are you talking about your own icons, or optionPane icons?
    if your own, use JLabels to show the icons and add as many as you want to
    a JPanel, then add the JPanel to the dialog

Maybe you are looking for

  • TO confirmation for picking: difference between RF and non RF transactions

    Hello, I am confirming one TO for picking in a outbound delivery process. My storage location is WM and HU managed and materials are batch managed. I noticed if I confirm TO through RF transaction (LM61), I have the following results per material on

  • Issue with sys_refcursor  in oracle  10.2.0.4.0

    hi, java is front end application and they want result set to be returned from oracle plsql, for simplicity i am writing code something like below. create or replace function fun () retrun sys_refcursor is tablename_cur sys_Refcursor; begin open tabl

  • Do you need .Mac accout to set up personal domain name!?

    i've just bought iLife '08 and i thought you could publish your own websites through iWeb. But so far it looks like i have to pay 60 odd quid on a .Mac account!! what a p* take!!

  • Displaying an exception during UI Logon

    Hi Experts, i am facing critical issue on my production system. On testing client, all the development done was working properly and everything moved to production. When i logged into CRM UI on production, i am getting an error 'Diagnosis An exceptio

  • Working with offline resolution

    When you edit a project in an offline resolution, how do you create elements in Photoshop and other programs that you do not want to recreate? For example, I have a project that is being shot on HDCAM (1080i), and will finally end up on DigiBeta and