SQL PROFILE


Hi guys,.

Database: 10.2.0.5

One question.

From my understanding, there are 2 types of sql Profiler:

1. one who 'fixed' plan and produced exactly the same plan (this would be equivalent to the old contours "stored").
2. one who 'does not' plan, but provide some clues such as "factors of scalling" which allow the optimizer produce a new plan, if conditions change, as more data.

I look through a content of my profile. I confirm that the sql profile is type 1? And will not change in the future? (because new statistics, data change). Thank you

DECLARE

sql_txt CLOB.

h SYS. SQLPROF_ATTR;

BEGIN

sql_txt: = q']

< sql statement >

]';

h: = SYS. () SQLPROF_ATTR

q '[BEGIN_OUTLINE_DATA]. "

q '[IGNORE_OPTIM_EMBEDDED_HINTS]. "

Q '[OPTIMIZER_FEATURES_ENABLE ('10.2.0.5')]',

q "[OPT_PARAM ("query_rewrite_enabled""false")]"

Q '[OUTLINE_LEAF(@"sel$2")]',

Q '[OUTLINE_LEAF(@"sel$1")]',

Q '[Outline(@"sel$2")]',

Q '[Outline(@"sel$1")]',

q'[NO_ACCESS (@"SALT$ 1" "from$_subquery$_001"@"SEL$1")]',.

q'[INDEX_RS_ASC (@"SALT$ 2" "B"@"SEL$2" ("TB_BOOK_METER".)] "METER_VALUE" "TB_BOOK_METER" "." " METER_TYPE' 'TB_BOOK_METER '. [(» METERID"))]',

q'[INDEX_RS_ASC (@"SALT$ 2" "A"@"SEL$2" ("TB_METER".)] "METERID"))]',

q'[LEADING (@"SALT$ 2" "B"@"SEL$2" "A"@"SEL$2")]',.

q'[USE_NL (@"SALT$ 2" "A"@"SEL$2")]',.

Q '[END_OUTLINE_DATA]');

: signature: = DBMS_SQLTUNE. SQLTEXT_TO_SIGNATURE (sql_txt);

DBMS_SQLTUNE. () IMPORT_SQL_PROFILE

sql_text = > sql_txt,

Profile = > h,

name = > 'coe_7jryqf0abn6x8_117721467 ',.

Description = > '7jryqf0abn6x8 CDE 117721467' | : signature: ",.

Category = > 'DEFAULT ',.

validate = > TRUE,

replace = > TRUE,

force_match = > TRUE / * TRUE: STRENGTH (even when match different literals in SQL). FALSE: RIGHT (similar to CURSOR_SHARING) * /);

END;

/

Thank you

It is more or less correct.

The profile SQL mechanism has been con¸u to work with the wizard to setup in SQL for the cardinality of the feedback and the selectivity of execution statistics.

If this use 'default' profile SQL tips as OPT_ESTIMATE.

But the same mechanism can be used to apply a set of tips or tricks and so there are these 'default' SQL Profiler to use as well.

I tend to call them profiles SQL WCC-style because of the COE_XFR_SQL_PROFILE provided by Oracle and supported. SQL script that uses DBMS_SQLTUNE. IMPORT_SQL_PROFILE to create this kind of profile after you have extracted the framework of memory or AWR.

Yes, it is a profile of WCC-style SQL.

And it is likely to be relatively stable as long as one or more of the tips are not disabled due to changes in the object.

This kind of profile SQL does not have a concrete plan in the way a baseline does (so not relevant to 10.2.0.5 feature 11g)

A reference doesn't know the specific plan hash, it must create, if it cannot reproduce it, the set of indicators is rejected.

While the profile of SQL has no knowledge of hash of the plan, boards can be fully or partially implemented.

It allows to reflect with the example of an index drop/change/rename.

Some or all tips in SQL profile can still be applied.

For the baseline, it is likely that all of the advice is rejected.

Tags: Database

Similar Questions

  • How to create an identifier SQL, sql Profiler

    Hi team,

    An application runs for a long time if I want to create the sql for If sql Profiler for the request. Example is my sql f70m2g5rbfvbg code.

    My question is how to create the sql for the best recommendation Profiler and how to import the sql for acccepting Profiler the best profile for improved performance.

    Please suggest

    Hello

    1. you must accept the best plan based on the recommendations of the Advisor tuning

    2. second thing is to import the profile sql - transport to destination db (where you want to import)

    -Pavan Kumar N

  • SQL profiles persist?

    Article "How do I add a hint of query ORACLE without touching his text" intermediate SQL"I discovered that I can change the index of a particular query uses without changing the source code.»»»

    My question is: if I do this, it would last once I upgrade to the next version of Oracle?

    Thank you

    Thomas

    Hi Thomas,

    Yes because it is based on the SQL Profiler, but depending on your release (and editing), there are 'official' ways to do today.

    SQL patches

    Fixing of the base lines

    Concerning

    Stefan

  • ORA-06528: PL/SQL Profiler generator runtime error

    Version 11.2.0.3.  I have installad DBMS_PROFILER:

    SYS AS SYSDBA > @?/rdbms/admin/profload.sql

    SYS AS SYSDBA > @?/rdbms/admin/proftab.sql


    I tried to use dbms_profiler.start_profiler in PLSQL code with user NUFN and discovered that lacked the NUFN user privileges on the objects of the Profiler. So I ran the following grants:

    grant the update, insert and delete on plsql_profiler_units to NUFN;

    grant the update, insert and delete on plsql_profiler_runs to NUFN;

    Grant execute on DBMS_PROFILER to NUFN;

    But still no luck:

    SQL > START

    dbms_profiler.start_profiler ('test1');

    EXECUTE IMMEDIATE 'select max (STATS_UPDATE_TIME), owner of the DBA_TAB_STATS_HISTORY group from owner to owner.

    dbms_profiler.stop_profiler ();

    END;

    /

    BEGIN

    *

    ERROR on line 1:

    ORA-06528: PL/SQL Profiler generator runtime error

    ORA-06512: at "SYS." DBMS_PROFILER", line 123

    ORA-06512: at "SYS." DBMS_PROFILER", line 132

    ORA-06512: at line 2

    I can't find what is missing from my user NUFN for her to be able to run DBMS_PROFILER.  Help, please!

    Thanks Bella, I had not run @?/rdbms/admin/proftab.sql as my user NUFN but as sys.  But you know what?  Even after execution of @?/rdbms/admin/proftab.sql as NUFN, the problem persisted!

    So I traced my session, read the trace file and found nothing wrong (but I have no experience in finding fault with the workings of dbms_profiler).  But I found the SQL code executed by the dbms_profiler.start_profiler command, which is:

    PARSING IN CURSOR #4574691968 len = 155 dep = 2 uid = 155 oct 2 lid = 155 = tim = hv 530047132716 = ad 3718124591 = "7000000946da848" sqlid = "akx2pxvftw51g."

    INSERT INTO PLSQL_PROFILER_RUNS (RUNID, RUN_DATE, RELATED_RUN, RUN_OWNER) VALUES (PLSQL_PROFILER_RUNNUMBER. NEXTVAL,: B1,: B2, USER) RETURN RUNID IN: O0

    END OF STMT

    ANALYSIS #4574691968:c = 315, e = 844, p = 0, cr = 0, cu = 0, put = 1, r = 0, dep = 2, og = 1, plh = 0, tim = 530047132715

    I tried manually the same HOME, and bingo, I discovered the cause of my problem:

    INSERT INTO PLSQL_PROFILER_RUNS (RUNID, RUN_DATE, RELATED_RUN, RUN_OWNER) VALUES (PLSQL_PROFILER_RUNNUMBER. NEXTVAL, sysdate, 'manually', 'ME');

    ORA-01950: no privileges on tablespace execution times

    After performing ALTER USER NUFN QUOTA UNLIMITED ON STATES; the problem has been resolved.

    Conclusion: after DBMS_PROFILER installation for a user, make sure that the user can write in objects DBMS_PROFILER (SUBSIDIES and QUOTAS).

  • Use business function: SQL profile

    SQL profile is only a function of Enterprise edition as in, just by using a profile that was not created in this database?

    I have a development environment, which is available for all.  I create a SQL profile for a bad statement on this database of the company, then I transfer in a database standard edition to help:

    How to copy one database to another SQL profile. | David Marcos & amp; #039; Blog

    When I now run the statement, I see that he is using the profile, but the following statement returns without success for me after using this feature:

    name of the pass for a50

    ALTER session set nls_date_format = "DD month yyyy";

    Select ' # use features of Enterprise Edition: "of the double;

    SELECT name, version, first_usage_date, last_usage_date of dba_feature_usage_statistics, whose name in ("Advanced Replication", "AWR report", "Basic AWR", "Automatic repository of workload", 'Encryption ","backup ZLIB Compression', "Block Media Recovery", "Database Replay: workload Capture ',' Database Replay: Replay of the workload ', 'Diagnostic Pack', em Page Performance", "Flashback Database" ") ","Security label"," OLAP - analytic workspaces, "OLAP - Cubes", "Oracle Secure Backup", "Parallel Execution of DDL SQL" 'Parallel DML SQL performance', "Parallel Execution of SQL query", "Partitioning (user)", "Real Time SQL Monitoring", "Result Cache", "SQL Monitoring and Tuning pages", 'SQL Plan Management', 'SQL Tuning Set (user)', "SecureFile encryption (user)", "Space", 'MView Tune', 'Tuning Pack', 'Automatic Maintenance - Setup SQL', 'SQL Profile. (, "SQL Tuning Advisor", "SQL Tuning Set (user)") and first_usage_date is not null order by ASC first_usage_date;

    So my question is: if I haven't created the profile in the database Standard Edition... it is just been imported from another data base... Am, I violated my license?

    Hello

    > So my question is: if I haven't created the profile in the database Standard Edition... it is just been imported from another data base... I'm violating my license?

    You break even your EE Oracle license, if you do not have a valid diagnostic + Tuning package for it. You can reproduce this very easily, as described by Kerry Osborne here: requirements for licenses for SQL profiles

    SQL Plan Management is included in Oracle EE as an alternative, for example: the use of SQL Plan Management and database DBMS_SPM package require a license pack tuning or diagnostic?

    Concerning

    Stefan

  • Exported sql profile

    Hello
    11g R2, Win 2008, I have two DBs. same Oracle Home. The same standard query takes 3 or 4 hours on slow DB and 200 ms on a fast. Then I exported profile Sql of DBfast to DBslow (using SQLT tool). The problem is not resolved. Always 3, 4 or slower. The number of rows in the tables is not too different, and more, in slower tables is smaller. The data files for both DBs are on the same disk. How to explain or possibly resolve this difference in execution time? Thanks for your ideas.

    We cannot change the query syntax. First of all, this is a standard request of PS. Second, if the syntax is wrong, it should be slow on the two DBs.
    =========================RAPID================================
    SQL> show parameter optimizer
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.3
    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>  SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_AWR('2prnxw2rdv','9176078'));
    SQL_ID 2prnxw2rdvfkd
    --------------------
    SELECT A.BUSINESS_UNIT, D.DESCR FROM PS_SP_RECV1_NONVW A,
    PS_SP_RCV1_NONVWLN D WHERE D.BUSINESS_UNIT LIKE 'IF%' AND
    D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.LANGUAGE_CD='FRA' UNION  SELECT
    BUSINESS_UNIT, DESCR FROM PS_SP_RECV1_NONVW A WHERE BUSINESS_UNIT LIKE
    'I%' AND NOT EXISTS (SELECT 'X' FROM PS_SP_RCV1_NONVWLN D  WHERE
    D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.LANGUAGE_CD='FRA') ORDER BY 1
    
    Plan hash value: 1299176078
    
    --------------------------------------------------------------------------------------------------------
    | Id  | Operation                         | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                  |                    |       |       |     9 (100)|          |
    |   1 |  SORT ORDER BY                    |                    |     4 |   170 |     9  (34)| 00:00:01 |
    |   2 |   SORT UNIQUE                     |                    |     4 |   170 |     8  (63)| 00:00:01 |
    |   3 |    UNION-ALL                      |                    |       |       |            |          |
    |   4 |     NESTED LOOPS                  |                    |     1 |    62 |     3   (0)| 00:00:01 |
    |   5 |      NESTED LOOPS                 |                    |     1 |    56 |     3   (0)| 00:00:01 |
    |   6 |       NESTED LOOPS                |                    |     1 |    48 |     2   (0)| 00:00:01 |
    |   7 |        NESTED LOOPS               |                    |     1 |    14 |     1   (0)| 00:00:01 |
    |   8 |         INDEX RANGE SCAN          | PSCRECV_HDR        |     1 |     8 |     1   (0)| 00:00:01 |
    |   9 |         INDEX UNIQUE SCAN         | PS_BUS_UNIT_TBL_FS |     1 |     6 |     0   (0)|          |
    |  10 |        TABLE ACCESS BY INDEX ROWID| PS_BUS_UNIT_LANG   |     1 |    34 |     1   (0)| 00:00:01 |
    |  11 |         INDEX UNIQUE SCAN         | PS_BUS_UNIT_LANG   |     1 |       |     0   (0)|          |
    |  12 |       INDEX RANGE SCAN            | PSCRECV_HDR        |     1 |     8 |     1   (0)| 00:00:01 |
    |  13 |      INDEX UNIQUE SCAN            | PS_BUS_UNIT_TBL_FS |     1 |     6 |     0   (0)|          |
    |  14 |     NESTED LOOPS                  |                    |       |       |            |          |
    |  15 |      NESTED LOOPS                 |                    |     1 |    36 |     2   (0)| 00:00:01 |
    |  16 |       INDEX RANGE SCAN            | PSCRECV_HDR        |     1 |     8 |     1   (0)| 00:00:01 |
    |  17 |        NESTED LOOPS               |                    |     1 |    24 |     1   (0)| 00:00:01 |
    |  18 |         NESTED LOOPS              |                    |     1 |    16 |     0   (0)|          |
    |  19 |          INDEX UNIQUE SCAN        | PS_BUS_UNIT_LANG   |     1 |    10 |     0   (0)|          |
    |  20 |          INDEX UNIQUE SCAN        | PS_BUS_UNIT_TBL_FS |     1 |     6 |     0   (0)|          |
    |  21 |         INDEX RANGE SCAN          | PSCRECV_HDR        |     1 |     8 |     1   (0)| 00:00:01 |
    |  22 |       INDEX UNIQUE SCAN           | PS_BUS_UNIT_TBL_FS |     1 |       |     0   (0)|          |
    |  23 |      TABLE ACCESS BY INDEX ROWID  | PS_BUS_UNIT_TBL_FS |     1 |    28 |     1   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------------------
    
    
    40 ligne(s) sÚlectionnÚe(s).
    
    
    
    
    SQL> select count(*) from sysadm.PS_BUS_UNIT_LANG;
             1
    
    SQL> select count(*) from sysadm.PS_BUS_UNIT_TBL_FS;
    
           170
    
    ==================SLOW=========================
    SQL> show parameter optimizer
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.3
    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
    
    Plan hash value: 1299176078
    
    ----------------------------------------------------------------------------------------------------------------
    | Id  | Operation                         | Name               | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT                  |                    |       |       |       |   915M(100)|          |
    |   1 |  SORT ORDER BY                    |                    |    25G|  1383G|  1056G|   915M  (1)|999:59:59 |
    |   2 |   SORT UNIQUE                     |                    |    25G|  1383G|  1538G|   593M  (1)|999:59:59 |
    |   3 |    UNION-ALL                      |                    |       |       |       |            |          |
    |   4 |     NESTED LOOPS                  |                    |    25G|  1383G|       |   108M  (2)|362:48:58 |
    |   5 |      NESTED LOOPS                 |                    |    25G|  1240G|       |   107M  (1)|359:49:20 |
    |   6 |       NESTED LOOPS                |                    |   158K|  6798K|       |   162K  (1)| 00:32:32 |
    |   7 |        NESTED LOOPS               |                    |   161K|  2213K|       |   687   (2)| 00:00:09 |
    |   8 |         INDEX RANGE SCAN          | PSCRECV_HDR        |   161K|  1264K|       |   682   (1)| 00:00:09 |
    |   9 |         INDEX UNIQUE SCAN         | PS_BUS_UNIT_TBL_FS |     1 |     6 |       |     0   (0)|          |
    |  10 |        TABLE ACCESS BY INDEX ROWID| PS_BUS_UNIT_LANG   |     1 |    30 |       |     1   (0)| 00:00:01 |
    |  11 |         INDEX UNIQUE SCAN         | PS_BUS_UNIT_LANG   |     1 |       |       |     0   (0)|          |
    |  12 |       INDEX RANGE SCAN            | PSCRECV_HDR        |   161K|  1264K|       |   681   (1)| 00:00:09 |
    |  13 |      INDEX UNIQUE SCAN            | PS_BUS_UNIT_TBL_FS |     1 |     6 |       |     0   (0)|          |
    |  14 |     NESTED LOOPS                  |                    |       |       |       |            |          |
    |  15 |      NESTED LOOPS                 |                    |  8095 |   276K|       |  8779   (1)| 00:01:46 |
    |  16 |       INDEX RANGE SCAN            | PSCRECV_HDR        |  8095 | 64760 |       |   682   (1)| 00:00:09 |
    |  17 |        NESTED LOOPS               |                    |   161K|  3794K|       |   681   (1)| 00:00:09 |
    |  18 |         NESTED LOOPS              |                    |     1 |    16 |       |     0   (0)|          |
    |  19 |          INDEX UNIQUE SCAN        | PS_BUS_UNIT_LANG   |     1 |    10 |       |     0   (0)|          |
    |  20 |          INDEX UNIQUE SCAN        | PS_BUS_UNIT_TBL_FS |     1 |     6 |       |     0   (0)|          |
    |  21 |         INDEX RANGE SCAN          | PSCRECV_HDR        |   161K|  1264K|       |   681   (1)| 00:00:09 |
    |  22 |       INDEX UNIQUE SCAN           | PS_BUS_UNIT_TBL_FS |     1 |       |       |     0   (0)|          |
    |  23 |      TABLE ACCESS BY INDEX ROWID  | PS_BUS_UNIT_TBL_FS |     1 |    27 |       |     1   (0)| 00:00:01 |
    ----------------------------------------------------------------------------------------------------------------
    
    Note
    -----
       - SQL profile "sqlt_s75336_p1" used for this statement
    
    
    44 ligne(s) sÚlectionnÚe(s).
    
    SQL> select count(*) from sysadm.PS_BUS_UNIT_LANG;
            22
    
    SQL> select count(*) from sysadm.PS_BUS_UNIT_TBL_FS;
            22

    Hello

    Before you import the stats in slowDB please take backup of current statistics in the slowDb. In case any question we can return back current stats

    EXEC ('SCHEMA_NAME', 'SCHEMA_NAME_STATS_22SEP2012_NEW') DBMS_STATS.create_stat_table;
    EXEC DBMS_STATS.export_schema_stats ('SCHEMA_NAME', 'SCHEMA_NAME_STATS_22SEP2012_NEW', NULL, 'SCHEMA_NAME');

    Kind regards
    Jey

  • Oracle VM in hirearcy pl/sql Profiler

    When to use hierarchy of pl/sql Profiler tool. I get a result and when I look at this output I see PLSQL. » ». » ». "' __plsql_vm ' on a single line and PLSQL. » ». » ». "" __anonymous_block ". I searched on google but I couldn't find anything.

    I mean, I would like to know what do refer to? That means machine virtual plsql in this report? You know any information about this?

    P#V PLSHPROF Internal Version 1.0
    P#! PL/SQL Timer Started
    P#C PLSQL."".""."__plsql_vm"
    P#X 3
    P#C PLSQL."".""."__anonymous_block"
    P#X 35
    P#C PLSQL."SYS"."DBMS_OUTPUT"::11."GET_LINE"#8440831613f0f5d3 #129
    P#X 6
    P#R
    P#X 11
    P#R
    P#X 0
    P#R
    P#C PLSQL."".""."__plsql_vm"
    P#X 4
    P#C PLSQL."".""."__anonymous_block"
    .
    .
    .
    .
    Thank you very much.

    It is documented here: http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/adfns_profiler.htm
    (scroll down for an explanation about the exit)

  • Considerations relating to the implementation of the SQL Profiler

    Oracle 11 g 2 Unix

    I wanted to know gurus if there are some things that we should take into consideration before you implement SQL profiles. Or we just blindly take the recommendations of the wizard to set up the SQL for profiles implementing SQL is based on the percentage of profit? I'm trying to think of things that I might as well before and possibly after.

    Thanks to you all.

    JrOraDBA

    My experience, SQL tuning Advisor recommends a profile 9 times out of 10.

    The main considerations are, for me if you have a problem of performance and speed to react.

    For example, I use the SQL Profiler to lock in previous drawings where the execution of a previous execution plan was good and the subsequent execution plan is a live performance problem that needs to be fixed as soon as possible.

    For this, I use the script provided by Oracle coe_xfr_sql_profile.sql discussed here:
    http://Carlos-Sierra.NET/tag/SQL-profile/

    This example uses a SQL profile to lock a specific plan by using the indicators of plan is not using SQL Profiler for statistical adjustments that they were originally designed for.

    In terms of general use of SQL and SQL profiles setting, this depends on the complexity of the sql statement and, therefore, the task of tuning.
    If the time, so I prefer to manually setting a sql statement.

    The benefits of the manual focus are the following:
    -poorly run sql is often misspelled or just wrong and rephrase the question can automatically lead to better performance through better estimates and decisions made by the optimizer. As a general rule, the tuning Advisor has limited or no visibility if a sql statement is badly written.
    -any plan stability features works by sql_id or interesting to raise issues for the development process, signature when sql statements are changed (and therefore the identity of sql and the signature change), questions on how developers should be aware of these features
    -question alsop on the spread of the use of the stability of the regime in environments

    But a sql profile can be implemented relatively (but not completely) risk free and quickly compared to the manual focus, provided that the recommended profile actually makes an improvement in performance.

  • How to extract a sql profile

    DB: 10.2
    10.2 business manager

    I know how to create profiles of sql. I did it manually. I had a complex query that I wanted to fix. So I used the Manager of the company to generate a sql tuning set and used the sql tuning Advisor. He integrate a sql profile.
    I can see the name of the sql profile and some details in DBA_SQL_PROFILEs.

    How can I extract the contents of the sql profile? I want to see what oracle oracle tips used. I know that some are internal when using enterprise manager.

    Guess2 wrote:
    DB: 10.2

    How can I extract the contents of the sql profile? I want to see what oracle oracle tips used. I know that some are internal when using enterprise manager.

    Here is a link to an article written by Kerry Osborne on SQL Profiler - and there is a link in the article to a script to extract the tips for a profile of the database: http://kerryosborne.oracle-guy.com/2009/04/oracle-sql-profiles/

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    Author: core Oracle

  • A question, when you use the sql Profiler features!

    Hi all.

    I have a question, when using feautre profile sql to oracle 10 g 2.

    As you know, 'DBMS_SQLTUNE. Procedure EXECUTE_TUNING_TASK' gives us
    a sql plan imploved automatically.

    However, in the event that the sql recommended plan of 'DBMS_SQLTUNE. EXECUTE_TUNING_TASK ".
    is not good enough to accept the plan sql generated, and instead, I have a better plan of sql.
    What should I do?

    Is it possible to force oracle to use my plan sql instead of plan recommended by oracle sql?
    The stored outline is not an option.

    Thanks in advance.
    Best regards.

    It seems that you really want to use the sql Profiler then?

    You can grant not only the instruction for this plan you want?

    If you want to manually create a profile, and then see the post below Kerry Osborne, essentially, you can remove the indicators needed to education to listen to v$ sql_plan and then their card in a profile for the original statement:
    http://kerryosborne.Oracle-guy.com/2010/07/SQLT-coe_xfr_sql_profilesql/

    See also the paper of Christian Antognini on profiles:
    http://Antognini.ch/papers/SQLProfiles_20060622.PDF

    11 g, base lines offer a much better facility to trace a plan from a single statement in a reference to another database.

  • How to check if a SQL profile is used or not?

    Hello

    We have a few plans and profiles SQL in the database. There has been some changes to the code and it is now difficult to follow if a SQL profile or outline is still used? Is it possible to find out who?

    Thanks in advance

    Look for the entry corresponding to the SQL statement you are reviewing in V$ SQL. Look at the OUTLINE_CATEGORY and SQL_PROFILE columns. NULL indicates that no plan/profile has been used.

  • pl/sql profiler - data not listed is not in the Profiler tables?

    Hi all - just have a little problem with the pl/sql Profiler.
    Database Version: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    Database Version: PL/SQL Release 10.2.0.5.0 - Production
    I created a test procedure:
    SQL > create or replace procedure testme
    2 as
    3
    number of v_customer_count 4;
    t_number v_level_table 5;
    Number 6 v_std_code_id;
    7
    Start 8
    9
    10. select count (*)
    11 in v_customer_count
    12 customer_master;
    13
    14 select level
    collection in bulk 15
    16 in v_level_table
    17 of the double
    18 connection of level < = 5000;
    19
    20
    21 end;
    22.

    Created procedure.


    and I run the procedure as follows:
    SQL> declare
      2     run_id number;
      3  begin
      4  
      5    run_id := dbms_profiler.start_profiler(to_char(sysdate,'dd-mm-yyyy hh24:mi:ss'));
      6    
      7    testme;
      8    
      9    dbms_profiler.flush_data;
     10    dbms_profiler.stop_profiler;
     11  
     12    dbms_output.put_line(run_id);
     13  
     14  end;
     15  /
    2
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.08
    but:
    SQL> select * from sys.plsql_profiler_runs
      2  /
    
    no rows selected
    
    Elapsed: 00:00:00.00
    SQL> select * from sys.plsql_profiler_data;
    
    no rows selected
    What Miss me?

    Run proftab.sql in your schema, also compile in debug mode before the race.

  • SQL profile will be lost after we recreate entire table?

    Hi people!

    Scenario:
    We have introduced by Sql Setup SQL profile and implemented since within the grid control in our database 10 g on a particular table.
    That forces the profile Sql optimizer oracle to use a base complete index instead of table scan function.

    A question is:
    This Sql profile will be lost if we do one of the following scenarios:
    1. recreate all the indexes on this table
    2. or we do Expdp, delete the table and then create a new and Impdp (export and import) that table?
    3. we rename the table and all indexes and then rename indexes and vice versa?

    Sql profile will disappear above scenarios?

    Any comments would be much appreciated.

    Bravo!

    That forces the profile Sql optimizer oracle to use a base complete index instead of table scan function.
    A question is:
    This Sql profile will be lost if we do one of the following scenarios:
    1. recreate all the indexes on this table
    2. or we do Expdp, delete the table and then create a new and Impdp (export and import) that table?
    3. we rename the table and all indexes and then rename indexes and vice versa?

    Hello

    Although I have not tested, but I think that there will be no impact on the profiles and it will stay there.
    Because unlike objects, a profile in SQL Statistics is mapped to an application, not an object or objects.
    You can see the SQL Profiler created in the view of the DBA_SQL_PROFILES dictionary. The SQL_TEXT column indicates the statement SQL profile has been attributed to; the STATUS column indicates whether the profile is enabled

    Kind regards
    Rajesh

  • CUCM SQL: Profile of device without line number [1]

    Hi guys,.

    We will clean our environment of Callmanager right now and I want to get the device of the user profiles that have never been deleted. Is it possible (my thought was via SQL) appears at least the profiles of the device, who do not have a line number [1] that are associated with (the DNs already have been deleted, but there is still a lot of old profiles laying around)

    Thank you for a short answer

    see you soon

    Marc

    Maybe someone can do it easily with SQL, but my thought is you can export the UDPs, filter profiles that don't have the directory number 1 in the header, and use this list to remove the profiles.

  • POOR and SQL Profiler

    Hello

    Is it possible to get the POOR sent to the ATG repository and SQL queries?

    I tried to enable the logging of debugging for atg/dynamo/service/jdbc/SQLRepository/and/atg/Dynamo/service/jdbc/SwitchingDataSource /, but it did not help.

    Thank you.

    Hello

    I'm not sure the description of your problem which is exactly the problem. If you want to get information from a repository of debugging, you need activate the component repository questioned against loggingDebug. for example if you are working with the product catalog you turn on loggingDebug on/atg/commerce/catalog/ProductCatalog, of the component. This would print published as SQL debugging messages.

    If that's not enough can you describe in detail what is the problem.

Maybe you are looking for