Re: SQL plan baseline parameters setting in oracle 11g env

Hi,
btw how does the Optimizer work if setting are as mentioned:
optimizer_capture_sql_plan_baselines FALSE FALSE
optimizer_use_sql_plan_baselines TRUE TRUE
abd there are no sql_plan_baselines at all ?
Thanks,
Gyuri

btw how does the Optimizer work if setting are as mentioned:
optimizer_capture_sql_plan_baselines FALSE FALSE
optimizer_use_sql_plan_baselines TRUE TRUE
abd there are no sql_plan_baselines at all ?When there is no sql_plan_baselines at all then there will be no plans captured into the SPB (SQL Plan Baseline) providing your above two parameters setting.
However, if there is already a sql baseline for a given sql statement then any execution of the same sql statement (with the same force matching signature) which results into a plan that is not into the SPM baseline, will be captured and will be given a enabled and not accepted status.
Best regards
Mohamed Houri
www.hourim.wordpress.com

Similar Messages

  • 11g [ SQL PLAN BASELINES ] LOOK UP ISSUE

    Hello everyone,
    Working on 11g R1/windows
    I'm trying to reltrieve some sql plan baselines, but nothing airs. The following is my configuration
    SQL> show parameter compatible
    NAME TYPE VALUE
    compatible string 11.1.0.0.0
    SQL> show parameter optimizer
    NAME TYPE VALUE
    optimizer_capture_sql_plan_baselines boolean TRUE
    optimizer_dynamic_sampling integer 2
    optimizer_features_enable string 11.1.0.6
    optimizer_index_caching integer 0
    optimizer_index_cost_adj integer 100
    optimizer_mode string ALL_ROWS
    optimizer_secure_view_merging boolean TRUE
    optimizer_use_invisible_indexes boolean FALSE
    optimizer_use_pending_statistics boolean FALSE
    optimizer_use_sql_plan_baselines boolean TRUE
    SQL> show parameter statistics
    NAME TYPE VALUE
    optimizer_use_pending_statistics boolean FALSE
    statistics_level string ALL
    timed_os_statistics integer 5
    timed_statistics boolean TRUE
    SQL> SELECT /*+ full(t) */ count(pad) FROM t WHERE n = 42;
    COUNT(PAD)
    1
    SQL> SELECT * FROM table(dbms_xplan.display_cursor);
    PLAN_TABLE_OUTPUT
    SQL_ID 659q28x85bkn7, child number 1
    SELECT /*+ full(t) */ count(pad) FROM t WHERE n = 42
    Plan hash value: 2966233522
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 23 (100)| |
    | 1 | SORT AGGREGATE | | 1 | 505 | | |
    PLAN_TABLE_OUTPUT
    |* 2 | TABLE ACCESS FULL| T | 1 | 505 | 23 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("N"=42)
    Why I'm getting the following result?
    SQL> select count(*) from dba_sql_plan_baselines;
    COUNT(*)
    0
    SQL> SELECT sql_handle, plan_name
    2 FROM dba_sql_plan_baselines;
    no rows selected
    *Normally the view dba_sql_plan_baselines shouldn't be empty, when seeing the following parameter set?
    *optimizer_capture_sql_plan_baselines boolean     TRUE
    statistics_level ALL
    Thank you for your help

    Perhaps, because you executed your statement only once?
    (I assume, you are reading the Christian Antognini's book - in that case you can read about it on page 292)
    Best regards
    Maxim

  • New Initialization Parameters introduced in Oracle 11G

    May I know where can i get list of all new Initialization Parameters introduced in Oracle 11G?
    In upgrade document i found deprecated and obolete parameters, but not all new parameters which are introduced in 11G
    Thanks
    Sarayu

    Hi;
    I belive below thread will answer your question
    evolution of init.ora parameters
    evolution of init.ora parameters
    Also Please check below notes:
    Oracle® Database Upgrade Guide 11g Release 1 (11.1)<< part Adjust the Initialization Parameter File for the New Release
    Oracle® Database New Features Guide
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28279/chapter1.htm
    Regard
    Helios

  • Can I use Same ADF application with SQL server 2008 as well as Oracle 11g?

    Hi ,
    I have created a application in ADF(Using J-Developer). I used SQL server 2008 as Database Provider. I have same Database in Oracle 11g. I want to connect my appliction to Oracle 11g database. I changed connection and connected to Oracle. But, when I tried to save or delete any data from front end, it gave error. Any solution on this?
    Thanks

    Hi,
    I have created Entity object and View object for every page in my application. That objects created from sql server database. Application is working fine with sql server. But when connected with Oracle 11g. It is giving following errors:
    On clicking search control it gives: ORA 00923 From keyword not found where expected.
    On searching with perticular field it gives: ORA-01722: Invalid Number.
    On Clicking save buttonit gives: ORA-00933: SQL command not properly ended.
    These are error messages from IntegratedWebLogicServer-Log:
    java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    <QueryCollection> <buildResultSet> [3929] java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    <DCBindingContainer> <cacheException> [3947] * * * BindingContainer caching EXCEPTION:oracle.jbo.SQLStmtException
    <DCBindingContainer> <cacheException> [3948] java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    <DCBindingContainer> <cacheException> [3949] * * * BindingContainer caching EXCEPTION:oracle.jbo.SQLStmtException
    <DCBindingContainer> <cacheException> [3950] java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    <DCBindingContainer> <cacheException> [3951] * * * BindingContainer caching EXCEPTION:oracle.jbo.SQLStmtException
    <DCBindingContainer> <cacheException> [3952] java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    <DCBindingContainer> <cacheException> [3953] * * * BindingContainer caching EXCEPTION:oracle.jbo.SQLStmtException
    <DCBindingContainer> <cacheException> [3954] java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
    java.lang.NullPointerException

  • How to generate TPC-E schema/data sets in Oracle 11g

    Hi,
    I want to use TPC-E schema in my Oracle 11g database (Standard) and also want to use DATA SETS from this benchmark for some kind of testing.
    I've download EGen v1.8.0 from this TPC website:
    http://www.tpc.org/tpce/default.asp
    but don't know who to implement this benchmark database into my computer's database. I'll appreciate if someone please suggest me how to do this...
    Thanks alot.
    Best Regards,
    Kamran

    kamran safdar malik wrote:
    I want to find Optimal size of a data block size as this is the one parameter which can increase the performance of a database or decrease it.If there is a single optimal size, that would surely be the default Oracle block size - as Oracle should know perhaps better than any of us, just what block size differences do as it is their code that uses it?
    Can I ask why you said that you would not have chosen this topic as a thesis?My leaning has always been to expert systems and A.I. Even designed and written my own expert system language years ago. One thing that is critical in such systems is how you structure data - and that has a nice database angle to it. One that I believe can still be exploited for research purposes.
    Don't you think that it'll benefit DBA's or database developer after I reach a successful conclusion?To be honest, in the real world of database systems, the least of my concerns are data block sizes. For example, we're busy putting together a storage array that should have a maximum I/O pipe size of 40Gb. In comparison, we currently use dual 2Gb fibre channels on most of our servers for our I/O.
    Technology moves fast. And perhaps there is an ideal block size for the standard storage array and Oracle instance today - but that could invalidated by new technology next year. Would I want to spend time and effort studying and analysing and researching a very specific technical subject, that perhaps is not considered as of that critical importance by DBAs and perhaps can be outdated with new technology and techniques?
    I honestly do not want to put you off studying db block sizes. Perhaps there's still some critical issues to uncover in that respect. But personally.. there are many other subject areas in database technology that peak my interest a lot more. But then you have your personal preferences and likes and dislikes - and data blocks could be your muse. :-)

  • Linked Servers - Sql server 2005 to connect to Oracle 11g using ldap.ora instead of tnsnames.ora

    We have a SQL Server 2005 64bit box that needs a linked server created to Oracle 11g 64bit box. I have all the Oracle client software installed and can successfully connect to the Oracle database using SQL+ on the SQL Server 2005 64bit box. When I create
    the linked server and select the OraOledb.Oracle provider, I get the TNSNames error. The Oracle server does not use tnsnames.ora it uses OLAP.ora to resolve. How do I get Linked server to stop trying to connect via TNSNames and use the OLAP.ora file instead?
    I can't find any articles for this specific issues. All Oracle examples tell you to use TNSNAMES. The Oracle server is not under my companies control so I can not force the vendor to use tnsnames instead of OLAP.

    Hi,
    Have you got a resolution?
    Thank you.

  • SQL PLUSW.EXE Not Supported on oracle 11G

    I installed Oracle 11G and am not able to connect the GUI SQL Plus. When SQLPlus.exe is
    executed, it brings me to a DOS based version of SQL Plus. Is there a way I can get the
    GUI verison installed with 11G?
    i ve installed Oracle Database 11g Release 1 Client (11.1.0.6.0)
    for Microsoft Windows (32-bit)
    but it gives me the same DOS based version
    In which version i ve to download to get GUI sql Plus on oracle 11G?

    user613197 wrote:
    I installed Oracle 11G and am not able to connect the GUI SQL Plus. When SQLPlus.exe is
    executed, it brings me to a DOS based version of SQL Plus. Is there a way I can get the
    GUI verison installed with 11G?
    i ve installed Oracle Database 11g Release 1 Client (11.1.0.6.0)
    for Microsoft Windows (32-bit)
    but it gives me the same DOS based version
    In which version i ve to download to get GUI sql Plus on oracle 11G?Do you mean internet based Sql*PLus?
    For this, you need to start the service (and you should be installed 11g Database, not client) as follows:
    isqlplusctl startThen using port number from $ORACLE_HOME/install/portlist.ini connect to GUI interface of SQL*Plus

  • Env Variable setting for Oracle 11g windows 2003 R2

    Hi ,
    While installing the Oracle 11g on windows 2003 R2 getting error while running the prerequsite steps for installtion.failing the env variables path. Please guide us to set up the Environmental variable for the oracle 11g installation.
    Thanks..

    Tippu wrote:
    Hi,
    Oracle version Oracle 11.2.0.1
    Os Windows 2003 R2
    we had set some values. though we are getting the below errors.
    Environment variable: "PATH" - This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.
    Expected Value
     : 1023
    Actual Value
     : 0
     List of errors:
    PRVF-3916 : Environment variable name "PATH" is not set on node "laxwzcl01"  - Cause:  Environment variable value could not be determined.  - Action:  Ensure that the environment variable is set and access permissions for the Oracle user allow access to read the environment variables. Restart the installer after correcting the setting for environment variable.It's like setting any other environment variable in Windows ...
    Right click My Computer, select Properties > Advanced tab > Environment variables button ...
    It should be self-evident from that point.

  • Query text and execution plan collection from prod DB Oracle 11g

    Hi all,
    I would like to collect query text, query execution plan and other statistics for all queries (mainly select queries) from production database.
    I am doing this by using OEM by click on Top activity link under performance tab but this gives top sql which is recent.
    This approach is helpful only when I need to debug recent queries only. If I need to know slow running queries and their execution plan at the end of day or sometime later then it’s not helpful for me.
    Anybody who has some better idea to do this will really be helpful.

    we did followings:
    1.Used awrextr.sql to export dmp file from production database.(imported snpashot id from 331 to 560)
    2.transfer file to test database.
    3.Used awrload.sql to import it in test database.
    but when we used OEM and went to Automatic Workload Repository link under Server tab
    its not showing snapshots of production database (which we have imported in test database )
    and showing only snapshot which was already there in test database.
    We did not find any error in import/export.
    do we need to perform something else also to display snapshots of production database in test database.

  • SQL * PLUS environment is missing in Oracle 11g

    I installed Oralce 11g successfully in my windows XP system.. but Here SQL * PLUS environment in missing.. how will i retain the SQL * environment? please help me

    Hi;
    I installed Oralce 11g successfully in my windows XP system.. but Here SQL * PLUS environment in missing.. how will i retain the SQL * environment? please help meWhat do you mean with " SQL * PLUS environment in missing" please give us more details.
    Regard
    Helios

  • Oracle 11g stats and SQL plan mgt

    Oracle 11.0.1.7:
    - According to what I have read so far in the various documents it looks like when dbms gather stats run and if that results in new sql plan oracle will not automatically start using that plan until it's verified by sql tuning advisor or is evolved. Is that correct? Is that the default behaviour?
    - I just upgraded from 10g to 11g so I am not sure how stats is behaving currently. I am really concerned and want to understand how it's behaving.
    - How can I tell what's going on currently in the system in terms of stats gathering and if the new better plan is being used or not.

    You have the default setting for the two parameters in place. That means, that if SQL Plan Baselines exist, they will be used, thereby preventing new execution plans from getting used without evolvement
    optimizer_use_sql_plan_baselines=true does that.
    But by default, there are no SQL Plan Baselines as long as you don't create them - for example with the setting of
    optimizer_capture_sql_plan_baselines=trueYou can check whether SQL Plan Baselines exist with
    select * from dba_sql_plan_baselines;It should return no rows.

  • SQL Plan Management - Baseline- Can it be used in another Schema

    Hi,
    I have never implemented, SQL Plan Management -Creating SQL plan baselines.
    I am having a query which is using indexes in one Schema.
    On another Schema in the same DB, the query accesses the SAME TABLE THROUGH SYNONYM. And the plan is very different. And query goes into indefinite execution.
    I have tried hints and other ways but it's simply not using the indexes.
    Anyone having experience with Baselines, can you suggest if I create a Baseline for the plan in SchemaA.
    Then can I use the same plan through Baseline in SchemaB for the same query?
    Please suggest..Thanks..

    Hi Jeneesh,
    Thanks for the reply.
    Problem is that the query has Xquery code inside and it's using the XMLType indexes. That's why it does not seem to be using the XML Indexes even by Hints.
    I have posted the scenario in XMLDB Forum as well:
    Re: Table in Schema1 using XMLIndexes But not in View- Schema2
    But can you think of any harm if I try to create Baseline and tag the query with it.
    So even in other schema if the same query is fired it will use the right Explain Plan.
    I am not able to figure out any other way right now.
    Please suggest..Thanks..

  • SQL  - Multiple plan baselines

    Dear Experts,
    I created a SQL plan baseline for one of the problematic SQL's yesterday and am seeing multiple sql plan baselines are getting created and are all enabled for this SQL ID.
    I would like to understand why there are so many plan baselines created? how to get rid of them?
    Thanks for your help!

    Hi,
    If intended to stop the collection of sql base lines kindly check the parameter "optimizer_capture_sql_plan_baselines" whether to enable based on your query execution with different bind variable inputs.
    - Thanks
    Pavan Kumar N

  • SQL PLAN MANAGEMENT - Locking in a more 'expensive', better plan.?

    Environment: 11.2.0.3 on HP-UX Itanium.
    We're preparing for an upgrade of our main production database from 10.2.0.3 to 11.2.0.3. We're using SQL Tuning Sets to capture execution plans from the 10G environment and load them into the upgraded (test) environment as SQL Plan Baselines. We've been using SQL Performance Analyzer to identify plans which have regressed from 10G to 11G. For these regressed plans we wish to use SPM to lock in the better 10G plan.
    We've been successful in locking in the 10G plans for those regressed queries where the 11g CBO "Cost" of the query is higher than it is in 10g, however we have some examples where SPA has shown a performance regression for queries (measured in terms of elapsed time, or buffer gets or CPU time), but the 11G explain plan has a lower "cost" as identified by the CBO. Ie: the 11G "cost" is lower, but the plan is worse.
    For these small number of queries, I have not been able to get the 11G optimiser to choose the 10G plans even though they are "fixed, enabled and accepted" within SPM. The optimiser consistently chooses what it considers its "lower cost" plan, even though it is a worst plan. Am I missing something here or should it be possible, with the use of SPM to have the optimiser chose the 10G plan, regardless of what its internal cost says?
    SQL> show parameter baseline
    NAME                                 TYPE        VALUE
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE

    I'm at a bit of a loss now as to where to proceed without posting the entire SPM Trace file, so excuse me for taking up so much bandwidth.
    But first some background. Our test databases should be identical in terms of schemas. That is we have a 10G prod database. From that we clone it to two test databases. One we leave at 10G, the other we upgrade to 11G. So there should be no schema differences between the 11G and 10G databases.
    h5.
    *** 2013-02-12 15:41:27.671
    SPM: statement found in SMB
    *** 2013-02-12 15:41:27.881
    SPM: fixed planId's of plan baseline are: 386463207
    SPM: using qksan to reproduce, cost and select accepted plan, sig = 17844158604836855983
    SPM: plan reproducibility round 1 (plan outline + session OFE)
    SPM: using qksan to reproduce accepted plan, planId = 386463207
    SPM: plan reproducibility - session OFE = 11020003, hinted OFE = 10020003
    SPM: planId in plan baseline = 386463207, planId of reproduced plan = 3080367404
    ------- START SPM Plan Dump -------
    SPM: failed to reproduce the plan using the following info:
      parse_schema name        : CARADM
      plan_baseline signature  : 17844158604836855983
      plan_baseline plan_id    : 386463207
      plan_baseline hintset    :
        hint num  1 len 27 text: IGNORE_OPTIM_EMBEDDED_HINTS
        hint num  2 len 37 text: OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
        hint num  3 len 36 text: OPT_PARAM('_always_anti_join' 'off')
        hint num  4 len 36 text: OPT_PARAM('_always_semi_join' 'off')
        hint num  5 len 40 text: OPT_PARAM('_index_join_enabled' 'false')
        hint num  6 len 43 text: OPT_PARAM('_optim_peek_user_binds' 'false')
        hint num  7 len 49 text: OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
        hint num  8 len 39 text: OPT_PARAM('optimizer_index_cost_adj' 1)
        hint num  9 len 40 text: OPT_PARAM('optimizer_index_caching' 100)
        hint num 10 len 10 text: FIRST_ROWS
        hint num 11 len 29 text: OUTLINE_LEAF(@"SEL$EE94F965")
        hint num 12 len 22 text: MERGE(@"SEL$9E43CB6E")
        hint num 13 len 17 text: OUTLINE(@"SEL$4")
        hint num 14 len 24 text: OUTLINE(@"SEL$9E43CB6E")
        hint num 15 len 22 text: MERGE(@"SEL$58A6D7F6")
        hint num 16 len 17 text: OUTLINE(@"SEL$3")
        hint num 17 len 24 text: OUTLINE(@"SEL$58A6D7F6")
        hint num 18 len 15 text: MERGE(@"SEL$1")
        hint num 19 len 17 text: OUTLINE(@"SEL$2")
        hint num 20 len 17 text: OUTLINE(@"SEL$1")
        hint num 21 len 36 text: FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
        hint num 22 len 153 text: INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PRO
    VIDER_GROUP_PERIOD"."START_DATE"))
        hint num 23 len 77 text: INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
        hint num 24 len 62 text: INDEX(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
        hint num 25 len 84 text: LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
        hint num 26 len 38 text: USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
        hint num 27 len 38 text: USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
        hint num 28 len 38 text: USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
    SPM: generated non-matching plan:
    ----- Explain Plan Dump -----
    ----- Plan Table -----
    ============
    Plan Table
    ============
    -------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                        | Name              | Rows  | Bytes | Cost  | Time      |
    -------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                 |                   |       |       |    22 |           |
    | 1   |  SORT UNIQUE                     |                   |    41 |  3116 |    21 |  00:00:01 |
    | 2   |   NESTED LOOPS                   |                   |       |       |       |           |
    | 3   |    NESTED LOOPS                  |                   |    41 |  3116 |    20 |  00:00:01 |
    | 4   |     NESTED LOOPS                 |                   |   826 |   50K |    11 |  00:00:01 |
    | 5   |      NESTED LOOPS                |                   |   826 |   26K |     3 |  00:00:01 |
    | 6   |       TABLE ACCESS FULL          | CL_PROVIDER_GROUP |   116 |  2668 |     2 |  00:00:01 |
    | 7   |       INDEX RANGE SCAN           | CPGP_UK           |     7 |    63 |     1 |  00:00:01 |
    | 8   |      TABLE ACCESS BY INDEX ROWID | CL_PROVIDER_DETAIL|     1 |    30 |     1 |  00:00:01 |
    | 9   |       INDEX UNIQUE SCAN          | CPDE_PK           |     1 |       |     1 |  00:00:01 |
    | 10  |     INDEX RANGE SCAN             | FACC_CPDE_FK_I    |     1 |       |     1 |  00:00:01 |
    | 11  |    TABLE ACCESS BY INDEX ROWID   | FN_ACCOUNT        |     1 |    14 |     1 |  00:00:01 |
    -------------------------------------------------------------+-----------------------------------+
    Predicate Information:
    7 - access("CPGR"."CPGR_ID"="CPGP"."CPGR_ID")
    9 - access("CPDE"."CPDE_ID"="CPGP"."CPDE_ID")
    10 - access("CPDE"."CPDE_ID"="CFCO"."CPDE_ID")
    10 - filter("CFCO"."CPDE_ID" IS NOT NULL)
    11 - filter((UPPER("CPGR"."NAME") LIKE UPPER('%'||:1||'%') OR UPPER("NAME") LIKE UPPER('%'||:2||'%') OR UPPER("ABN") LIKE UPPER(:3||'%') OR "CFCO"."A
    CCT_NO" LIKE UPPER(:4||'%')))
    Content of other_xml column
    ===========================
      db_version     : 11.2.0.3
      parse_schema   : CARADM
      plan_hash      : 524147661
      plan_hash_2    : 3080367404
      Outline Data:
      /*+
        BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('11.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('_always_anti_join' 'off')
          OPT_PARAM('_always_semi_join' 'off')
          OPT_PARAM('_index_join_enabled' 'false')
          OPT_PARAM('_optim_peek_user_binds' 'false')
          OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
          OPT_PARAM('optimizer_index_cost_adj' 1)
          OPT_PARAM('optimizer_index_caching' 100)
          FIRST_ROWS
          OUTLINE_LEAF(@"SEL$EE94F965")
          MERGE(@"SEL$9E43CB6E")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$9E43CB6E")
          MERGE(@"SEL$58A6D7F6")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$58A6D7F6")
          MERGE(@"SEL$1")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
          INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PROVIDER_GROUP_PERIOD"."STA
    RT_DATE"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
          INDEX(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
          LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
          USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
          USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
          USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
          NLJ_BATCHING(@"SEL$EE94F965" "CFCO"@"SEL$3")
        END_OUTLINE_DATA
    ------- END SPM Plan Dump -------
    SPM: plan reproducibility round 1 (plan outline only)
    SPM: using qksan to reproduce accepted plan, planId = 386463207
    SPM: planId in plan baseline = 386463207, planId of reproduced plan = 4009937738
    ------- START SPM Plan Dump -------
    SPM: failed to reproduce the plan using the following info:
      parse_schema name        : CARADM
      plan_baseline signature  : 17844158604836855983
      plan_baseline plan_id    : 386463207
      plan_baseline hintset    :
        hint num  1 len 27 text: IGNORE_OPTIM_EMBEDDED_HINTS
        hint num  2 len 37 text: OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
        hint num  3 len 36 text: OPT_PARAM('_always_anti_join' 'off')
        hint num  4 len 36 text: OPT_PARAM('_always_semi_join' 'off')
        hint num  5 len 40 text: OPT_PARAM('_index_join_enabled' 'false')
        hint num  6 len 43 text: OPT_PARAM('_optim_peek_user_binds' 'false')
        hint num  7 len 49 text: OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
        hint num  8 len 39 text: OPT_PARAM('optimizer_index_cost_adj' 1)
        hint num  9 len 40 text: OPT_PARAM('optimizer_index_caching' 100)
        hint num 10 len 10 text: FIRST_ROWS
        hint num 11 len 29 text: OUTLINE_LEAF(@"SEL$EE94F965")
        hint num 12 len 22 text: MERGE(@"SEL$9E43CB6E")
        hint num 13 len 17 text: OUTLINE(@"SEL$4")
        hint num 14 len 24 text: OUTLINE(@"SEL$9E43CB6E")
        hint num 15 len 22 text: MERGE(@"SEL$58A6D7F6")
        hint num 16 len 17 text: OUTLINE(@"SEL$3")
        hint num 17 len 24 text: OUTLINE(@"SEL$58A6D7F6")
        hint num 18 len 15 text: MERGE(@"SEL$1")
        hint num 19 len 17 text: OUTLINE(@"SEL$2")
        hint num 20 len 17 text: OUTLINE(@"SEL$1")
        hint num 21 len 36 text: FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
        hint num 22 len 153 text: INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PRO
    VIDER_GROUP_PERIOD"."START_DATE"))
        hint num 23 len 77 text: INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
        hint num 24 len 62 text: INDEX(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
        hint num 25 len 84 text: LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
        hint num 26 len 38 text: USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
        hint num 27 len 38 text: USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
        hint num 28 len 38 text: USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
    SPM: generated non-matching plan:
    ----- Explain Plan Dump -----
    ----- Plan Table -----
    ============
    Plan Table
    ============
    ------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                       | Name              | Rows  | Bytes | Cost  | Time      |
    ------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                |                   |       |       |   179 |           |
    | 1   |  SORT UNIQUE                    |                   |   153 |   11K |   178 |  00:00:01 |
    | 2   |   NESTED LOOPS                  |                   |   153 |   11K |   177 |  00:00:01 |
    | 3   |    NESTED LOOPS                 |                   |   826 |   50K |    11 |  00:00:01 |
    | 4   |     NESTED LOOPS                |                   |   826 |   26K |     3 |  00:00:01 |
    | 5   |      TABLE ACCESS FULL          | CL_PROVIDER_GROUP |   116 |  2668 |     2 |  00:00:01 |
    | 6   |      INDEX RANGE SCAN           | CPGP_UK           |     7 |    63 |     1 |  00:00:01 |
    | 7   |     TABLE ACCESS BY INDEX ROWID | CL_PROVIDER_DETAIL|     1 |    30 |     1 |  00:00:01 |
    | 8   |      INDEX UNIQUE SCAN          | CPDE_PK           |     1 |       |     1 |  00:00:01 |
    | 9   |    TABLE ACCESS BY INDEX ROWID  | FN_ACCOUNT        |     1 |    14 |     1 |  00:00:01 |
    | 10  |     INDEX RANGE SCAN            | FACC_CPDE_FK_I    |    27 |       |     1 |  00:00:01 |
    ------------------------------------------------------------+-----------------------------------+
    Predicate Information:
    6 - access("CPGR"."CPGR_ID"="CPGP"."CPGR_ID")
    8 - access("CPDE"."CPDE_ID"="CPGP"."CPDE_ID")
    9 - filter((UPPER("CPGR"."NAME") LIKE UPPER('%'||:1||'%') OR UPPER("CPDE"."NAME") LIKE UPPER('%'||:2||'%') OR UPPER("CPDE"."ABN") LIKE UPPER(:3||'%')
    OR "CFCO"."ACCT_NO" LIKE UPPER(:4||'%')))
    10 - access("CPDE"."CPDE_ID"="CFCO"."CPDE_ID")
    10 - filter("CFCO"."CPDE_ID" IS NOT NULL)
    Content of other_xml column
    ===========================
      db_version     : 11.2.0.3
      parse_schema   : CARADM
      plan_hash      : 3311216257
      plan_hash_2    : 4009937738
      Outline Data:
      /*+
        BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('_always_anti_join' 'off')
          OPT_PARAM('_always_semi_join' 'off')
          OPT_PARAM('_index_join_enabled' 'false')
          OPT_PARAM('_optim_peek_user_binds' 'false')
          OPT_PARAM('_optimizer_skip_scan_enabled' 'false')
          OPT_PARAM('optimizer_index_cost_adj' 1)
          OPT_PARAM('optimizer_index_caching' 100)
          FIRST_ROWS
          OUTLINE_LEAF(@"SEL$EE94F965")
          MERGE(@"SEL$9E43CB6E")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$9E43CB6E")
          MERGE(@"SEL$58A6D7F6")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$58A6D7F6")
          MERGE(@"SEL$1")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
          INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PROVIDER_GROUP_PERIOD"."STA
    RT_DATE"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
          LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
          USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
          USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
          USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
        END_OUTLINE_DATA
    ------- END SPM Plan Dump -------
    SPM: plan reproducibility round 2 (hinted OFE only)
    SPM: using qksan to reproduce accepted plan, planId = 386463207
    SPM: planId in plan baseline = 386463207, planId of reproduced plan = 4009937738
    ------- START SPM Plan Dump -------
    SPM: failed to reproduce the plan using the following info:
      parse_schema name        : CARADM
      plan_baseline signature  : 17844158604836855983
      plan_baseline plan_id    : 386463207
      plan_baseline hintset    :
        hint num  1 len 37 text: OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
    SPM: generated non-matching plan:
    ----- Explain Plan Dump -----
    ----- Plan Table -----
    ============
    Plan Table
    ============
    ------------------------------------------------------------+-----------------------------------+
    | Id  | Operation                       | Name              | Rows  | Bytes | Cost  | Time      |
    ------------------------------------------------------------+-----------------------------------+
    | 0   | SELECT STATEMENT                |                   |       |       |   179 |           |
    | 1   |  SORT UNIQUE                    |                   |   153 |   11K |   178 |  00:00:01 |
    | 2   |   NESTED LOOPS                  |                   |   153 |   11K |   177 |  00:00:01 |
    | 3   |    NESTED LOOPS                 |                   |   826 |   50K |    11 |  00:00:01 |
    | 4   |     NESTED LOOPS                |                   |   826 |   26K |     3 |  00:00:01 |
    | 5   |      TABLE ACCESS FULL          | CL_PROVIDER_GROUP |   116 |  2668 |     2 |  00:00:01 |
    | 6   |      INDEX RANGE SCAN           | CPGP_UK           |     7 |    63 |     1 |  00:00:01 |
    | 7   |     TABLE ACCESS BY INDEX ROWID | CL_PROVIDER_DETAIL|     1 |    30 |     1 |  00:00:01 |
    | 8   |      INDEX UNIQUE SCAN          | CPDE_PK           |     1 |       |     1 |  00:00:01 |
    | 9   |    TABLE ACCESS BY INDEX ROWID  | FN_ACCOUNT        |     1 |    14 |     1 |  00:00:01 |
    | 10  |     INDEX RANGE SCAN            | FACC_CPDE_FK_I    |    27 |       |     1 |  00:00:01 |
    ------------------------------------------------------------+-----------------------------------+
    Predicate Information:
    6 - access("CPGR"."CPGR_ID"="CPGP"."CPGR_ID")
    8 - access("CPDE"."CPDE_ID"="CPGP"."CPDE_ID")
    9 - filter((UPPER("CPGR"."NAME") LIKE UPPER('%'||:1||'%') OR UPPER("CPDE"."NAME") LIKE UPPER('%'||:2||'%') OR UPPER("CPDE"."ABN") LIKE UPPER(:3||'%')
    OR "CFCO"."ACCT_NO" LIKE UPPER(:4||'%')))
    10 - access("CPDE"."CPDE_ID"="CFCO"."CPDE_ID")
    10 - filter("CFCO"."CPDE_ID" IS NOT NULL)
    Content of other_xml column
    ===========================
      db_version     : 11.2.0.3
      parse_schema   : CARADM
      plan_hash      : 3311216257
      plan_hash_2    : 4009937738
      Outline Data:
      /*+
        BEGIN_OUTLINE_DATA
          IGNORE_OPTIM_EMBEDDED_HINTS
          OPTIMIZER_FEATURES_ENABLE('10.2.0.3')
          DB_VERSION('11.2.0.3')
          OPT_PARAM('optimizer_index_cost_adj' 1)
          OPT_PARAM('optimizer_index_caching' 100)
          FIRST_ROWS
          OUTLINE_LEAF(@"SEL$EE94F965")
          MERGE(@"SEL$9E43CB6E")
          OUTLINE(@"SEL$4")
          OUTLINE(@"SEL$9E43CB6E")
          MERGE(@"SEL$58A6D7F6")
          OUTLINE(@"SEL$3")
          OUTLINE(@"SEL$58A6D7F6")
          MERGE(@"SEL$1")
          OUTLINE(@"SEL$2")
          OUTLINE(@"SEL$1")
          FULL(@"SEL$EE94F965" "CPGR"@"SEL$1")
          INDEX(@"SEL$EE94F965" "CPGP"@"SEL$1" ("CL_PROVIDER_GROUP_PERIOD"."CPGR_ID" "CL_PROVIDER_GROUP_PERIOD"."CPDE_ID" "CL_PROVIDER_GROUP_PERIOD"."STA
    RT_DATE"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CPDE"@"SEL$2" ("CL_PROVIDER_DETAIL"."CPDE_ID"))
          INDEX_RS_ASC(@"SEL$EE94F965" "CFCO"@"SEL$3" ("FN_ACCOUNT"."CPDE_ID"))
          LEADING(@"SEL$EE94F965" "CPGR"@"SEL$1" "CPGP"@"SEL$1" "CPDE"@"SEL$2" "CFCO"@"SEL$3")
          USE_NL(@"SEL$EE94F965" "CPGP"@"SEL$1")
          USE_NL(@"SEL$EE94F965" "CPDE"@"SEL$2")
          USE_NL(@"SEL$EE94F965" "CFCO"@"SEL$3")
        END_OUTLINE_DATA
    ------- END SPM Plan Dump -------
    SPM: couldn't reproduce any enabled+accepted plan so using the cost-based plan, planId = 3838063866
    SPM: kkopmCheckSmbUpdate (enter) xscP=0x9fffffff7f3c8cc8, pmExCtx=0xc000000c8bbade48, ciP=0xc000000c872f95c0, dtCtx=0x6000000000054c30apologies once again for the huge post.

  • What are the privileges required for explain plan in Oracle 11g database

    I am facing the problem in doing a explain plan for a view in Oracle 11g database. When I select from the view like this:
    select * from zonewisearpu
    It does a select on the view but when I give explain plan like
    explain plan for
    select * from zonewisearpu
    I get the error like insufficient privileges.
    Please let me know if things are getting missed out as I guess system level privileges are required to execute this.
    I hope, my question is clear.
    It’s a humble request to revert urgently if possible as I need to complete a task and do not know the way out.
    Regards

    975148 wrote:
    Thanks for your reply. I have found out that an explain plan is possible on the user's own objects and is not possible on the granted objects from a different schema. For eg, if I do a explain plan on a view querying on tables from a different view, it would not allow the explain plan to proceed. This could mean that explain plan needs different privileges than just a select.
    Requesting for a revert to this.
    Here is a simple test case that I have perfomed
    SQL> create user test1 identified by test1;
    User created.
    SQL> create user test2 identified by test1;
    User created.
    SQL> grant connect, resource to test1,test2;
    Grant succeeded.
    SQL> create table test1.tab1 as select * from v$session;
    Table created.
    SQL> connect test2/test1
    Conencted.
    SQL> show user
    USER is "TEST2"
    SQL>
    SQL> explain plan for
      2  select sid,serial#,status,username from test1.tab1 where username<> '';
    Explained.
    SQL>
    So, as can be seen I am able to do a explain plan from user test2 for tables belong to user test1.
    As far as privileges are concerned, following is the list
    SQL> select * from dba_role_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE                        GRANTED_ROLE                   ADM DEF
    TEST1                          CONNECT                        NO  YES
    TEST1                          RESOURCE                       NO  YES
    TEST2                          CONNECT                        NO  YES
    TEST2                          RESOURCE                       NO  YES
    SQL>
    SQL> select grantee,owner,table_name,privilege from dba_tab_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE    OWNER      TABLE_NAME           PRIVILEGE
    TEST2      TEST1      TAB1                 SELECT
    SQL>
    SQL>  select * from dba_sys_privs where grantee in ('TEST1','TEST2') order by 1;
    GRANTEE    PRIVILEGE                      ADM
    TEST1      UNLIMITED TABLESPACE           NO
    TEST2      UNLIMITED TABLESPACE           NO
    SQL>

Maybe you are looking for

  • Bridge Photo Downloader Crashes Elements 8 iphone 4S

    Photoshop Elements 8 (version 8.0). This is first time I tried to use photo downloader from Adobe Bridge (CS4 3.0.0.464) with my iphone 4s. It crashes every time. Have been to preferences and deleted adobe.downloader.plist. Still crashes. Thanks for

  • ITunes 10.4.1 Problem with Key Command Go to Current Song - Doesn't always work

    Since updating to iTunes 10.4.1, I've noticed that the key command, command + L doesn't always work to display the current song.

  • Xperia Z1 touchscreen issue

    Hello, I am one of the unlucky owners of a Z1 which has a problem with the touchscreen. The issue is known. People report that the screen registers an input, then shortly losses the input and then regains it, making web browsing difficult as anything

  • AV cable into back of Mac Pro

    Hello all, I want to assume that the only way to get video into the back of the Mac is through a FireWire connection. I am needing a long length of cable, 80', for a theatre production from the camera to the Mac Pro we are using to control the video.

  • How to delete my charts of accounts

    hi i want to delete my chat accounts,when i trying my charts accounts, error msgs will be " use chat accounts deletion function" wht i want todo. How it will delete. Thank you Ashok