Manual sql tuning advisor
Hi all10g R2 on solaris 10
task created as:
declare
my_task_name varchar2(30);
my_sqltext clob;
begin
my_sqltext:='insert into tabsbgr.PREP_FIRST_CALL_LAT SELECT MIN(TRUNC(I.TRANSDATE)) "TRANSDATE", c.subno , c.contrno, c.prepost_paid,c.tariff_profile,DECODE(num_type, ''P'',''Platinium'',''G'',''Golden'',''S'',''Silver'',''B'',''Bronze'',''V'',''Regular'',num_type) NUMBER_TYPE, TRUNC(C.CREATION_DATE) "Activation Date",Sysdate "Idate",null,null FROM crm_user_info c, incalls i WHERE c.subno = i.subno AND C.PREPOST_PAID =''PREP'' AND c.subno LIKE ''5%'' AND ( c.subno NOT IN (SELECT subno FROM tabsbgr.PREP_FIRST_CALL_LAT l2 where l2.subno = c.subno and l2.termination_date is null ) or (c.subno in (SELECT subno FROM tabsbgr.PREP_FIRST_CALL_LAT l1 where c.subno = l1.subno and l1.termination_date < trunc(i.transdate) AND TERMINATION_DATE IS NOT NULL AND L1.SUBNO NOT IN (SELECT subno FROM tabsbgr.PREP_FIRST_CALL_LAT l3 where l3.subno = L1.subno and l3.termination_date is null ) ))) GROUP BY c.subno , c.contrno, c.prepost_paid,c.tariff_profile , NUM_TYPE,TRUNC(C.CREATION_DATE)';
my_task_name := dbms_sqltune.create_tuning_task (
sql_text => my_sqltext,
user_name => 'TABS',
scope => 'COMPREHENSIVE',
time_limit => 60,
task_name => 'my_sql_tuning_task_feb',
description => 'Task to tune a query for final');
end;
/
run the same:begin
dbms_sqltune.execute_tuning_task( task_name => 'my_sql_tuning_task_feb');
end;
/
When selects the data asSELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task_feb') from DUAL;
It's displaying the below info (with results)DBMS_SQLTUNE. REPORT_TUNING_TAS
--------------------------------------------------------------------------------
GENERAL INFORMATION SECTION
----------------------------------------------------
When am running thorough db console, it works fine.(recommended to accept the sql profile) though I accepted it,the problem is the optimzer couldn't ifnd the sql profile when it runs the next time. SO iI decided to run it manually to attach the sql profile to the sql query..
Any idea why SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task_feb') from DUAL; not displaying any records ?..where as the same in dbconsole is giving the recommendations ?
Thanks
Kai
Just a guess. Took you LONG to a large enough value?
Tags: Database
Similar Questions
-
additional licenses set forth for the use of Sql Tuning Advisor in SQL Developer 4.0.3
Hello
We have the Oracle 11 g Enterprise Edition Release 11.2.0.3.0 database. Do we need to acquire an oracle license extra for using SQL Tuning Advisor Option in SQL Developer 4.0.3
No, they are installed by default.
They must be licensed.
Consult your contract or talk to your account manager Oracle for clarification.
-
License required for "Automatic SQL Tuning Advisor"?
I noticed a lot of databases in my company show using a component called "Automatic SQL Tuning Advisor" or "Automatic maintenance - Setup SQL" in DBA_FEATURE_USAGE_STATISTICS.
Do we know if this component requires a License Pack Tuning or it could be one of the internal out-of-box/system uses that do not require a license?
Thank you!
I need a License Pack - Tuning
MOS Doc ID 276103.1
Best to check with your sales representative
-
SQL tuning advisor recommnds to create the function SYS_OP_C2C function index
I have a large table and an index on it. I use a tool to fill data, this simple tool submits the sql for Oracle DB and it does NOT index to use for requests. When I run the sql tuning advisor, he recommends to create additional indexes and use the SYS_OP_C2C function, which I don't want.
When I run the query through sql plus picks it up in the index.
Someone of you came, why its recommend that additional nonsense?
create index abc.xxxx on this_table (SYS_OP_C2C ("this_column"));
Thank youThe internal Oracle SYS_OP_C2C function perform the conversion of a set of characters to another set of characters - C (haracterSet) 2 c (haracterSet). There are situations where you will see this conversion without explicit, as in this case command that should be a sign that the data types are not the same and the implicit conversion takes place and this could also be a problem from the point of view performance because it can disable the use of the index.
Make sure you the characterset and nls set of all of the database and the tool are the same.
Make sure that the data type of the column in the index is the same as the database.
Confirm the ETL vendor for your database support and fixes, etc..Optimizer will only advise to use this function when the data type or the character set does not match.
Thank you
Kerry -
Package DBMS_ADVISOR can be used for SQL Tuning Advisor?
Package DBMS_ADVISOR can be used for SQL Tuning Advisor?It seems that the DBMS_ADVISOR package is responsible for the workload and SQL Access Advisor of related tasks. Package DBMS_SQLTUNE is responsible for setting up SQL and SQL set related tasks.
Jetq
-
SQL Tuning Advisor on a select Question
Hi all.
10.2.0.4 RAC
I have a select sequential reading of file db high. I used sql tuning advisor on OEM, and the Adviser show me these recommendations:
I think the main problem is the order, but when I run autotrace traceonly without order by the plan of the explain command is diferent to advise:RECOMMENDATIONS ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- GENERAL INFORMATION SECTION ------------------------------------------------------------------------------- Tuning Task Name : SQL_TUNING_1266335308111 Tuning Task Owner : SYSTEM Scope : COMPREHENSIVE Time Limit(seconds) : 1800 Completion Status : COMPLETED Started at : 02/16/2010 16:48:44 Completed at : 02/16/2010 16:50:06 Number of SQL Profile Findings : 1 ------------------------------------------------------------------------------- Schema Name: CRM SQL ID : b7cd8jntqpcgu SQL Text : select * from ( select this_.ENVIO_ID as ENVIO1_33_0_, this_.NOMCLIENTE as NOMCLIENTE33_0_, this_.NOMCONTACTO as NOMCONTA3_33_0_, this_.APLICACION_ID as APLICACION4_33_0_, this_.PRIORIDAD as PRIORIDAD33_0_, this_.MEDIO as MEDIO33_0_, this_.MEDIO_VALOR as MEDIO7_33_0_, this_.ESTADO as ESTADO33_0_, this_.ESTADO_DESC as ESTADO9_33_0_, this_.FEC_PREVISTA as FEC10_33_0_, this_.FECHA_ENVIO as FECHA11_33_0_, this_.REC_CLIENTE as REC12_33_0_, this_.FECHACREA as FECHACREA33_0_, this_.FECHAMODIF as FECHAMODIF33_0_, this_.FLAGBLOQUEO as FLAGBLO15_33_0_, this_.FLAGBORRADO as FLAGBOR16_33_0_, this_.COMENTARIOS as COMENTA17_33_0_, this_.HORAENVIO as HORAENVIO33_0_, this_.EMISOR as EMISOR33_0_, this_.IDENTIFICADOR as IDENTIF20_33_0_, this_.MEDIO_VALOR_DESC as MEDIO21_33_0_, this_.DEBUG_TRACE as DEBUG22_33_0_, this_.FORMULARIO_ID as FORMULARIO23_33_0_, this_.CAMPANYA_ID as CAMPANYA24_33_0_, this_.CONTACTO_ID as CONTACTO25_33_0_, this_.USUARIOCREA as USUARIO26_33_0_, this_.USUARIOMODIF as USUARIO27_33_0_, this_.CLIENTE_ID as CLIENTE28_33_0_, this_.CAMPPOS_ID as CAMPPOS29_33_0_, this_.ACTIVIDAD_ID as ACTIVIDAD30_33_0_, this_.TAGCLICONEXT_ID as TAGCLIC31_33_0_ from CRM.CRM_ENVIOS this_ where this_.MEDIO=:1 and this_.ESTADO=:2 and this_.FECHA_ENVIO<=:3 order by this_.ENVIO_ID asc ) where rownum <= :4 ------------------------------------------------------------------------------- FINDINGS SECTION (1 finding) ------------------------------------------------------------------------------- 1- SQL Profile Finding (see explain plans section below) -------------------------------------------------------- A potentially better execution plan was found for this statement. Recommendation (estimated benefit: 99.43%) ------------------------------------------ - Consider accepting the recommended SQL profile. execute dbms_sqltune.accept_sql_profile(task_name => 'SQL_TUNING_1266335308111', replace => TRUE); ------------------------------------------------------------------------------- ADDITIONAL INFORMATION SECTION ------------------------------------------------------------------------------- - The optimizer could not merge the view at line ID 2 of the execution plan. The optimizer cannot merge a view that contains an "ORDER BY" clause unless the statement is a "DELETE" or an "UPDATE" and the parent query is the top most query in the statement. ------------------------------------------------------------------------------- EXPLAIN PLANS SECTION ------------------------------------------------------------------------------- 1- Original With Adjusted Cost ------------------------------ Plan hash value: 3505713201 ---------------------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ---------------------------------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 4416 | 604K (1)| 02:00:53 | |* 1 | COUNT STOPKEY | | | | | | | 2 | VIEW | | 1 | 4416 | 604K (1)| 02:00:53 | |* 3 | TABLE ACCESS BY INDEX ROWID| CRM_ENVIOS | 1 | 352 | 604K (1)| 02:00:53 | | 4 | INDEX FULL SCAN | SYS_C0020438 | 2718K| | 8153 (1)| 00:01:38 | ---------------------------------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 1 - filter(ROWNUM<=:4) 3 - filter("THIS_"."MEDIO"=:1 AND "THIS_"."ESTADO"=:2 AND "THIS_"."FECHA_ENVIO"<=:3) 2- Using SQL Profile -------------------- Plan hash value: 3391889105 ------------------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 1 | 4416 | 3431 (1)| 00:00:42 | |* 1 | COUNT STOPKEY | | | | | | | 2 | VIEW | | 1 | 4416 | 3431 (1)| 00:00:42 | |* 3 | SORT ORDER BY STOPKEY | | 1 | 352 | 3431 (1)| 00:00:42 | |* 4 | TABLE ACCESS BY INDEX ROWID| CRM_ENVIOS | 1 | 352 | 3430 (1)| 00:00:42 | |* 5 | INDEX SKIP SCAN | APLICACIONENVIO_IDX | 1 | | 3429 (1)| 00:00:42 | ------------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 1 - filter(ROWNUM<=:4) 3 - filter(ROWNUM<=:4) 4 - filter("THIS_"."MEDIO"=:1 AND "THIS_"."FECHA_ENVIO"<=:3) 5 - access("THIS_"."ESTADO"=:2) filter("THIS_"."ESTADO"=:2) -------------------------------------------------------------------------------
I was looking for a way to see who wear's Advisor using his plan, but didn't see a way of knowing on docs, or at least I have not found it.SELECT * 2 FROM (SELECT this_.envio_id AS envio1_33_0_, 3 this_.nomcliente AS nomcliente33_0_, 4 this_.nomcontacto AS nomconta3_33_0_, 5 this_.aplicacion_id AS aplicacion4_33_0_, 6 this_.prioridad AS prioridad33_0_, this_.medio AS medio33_0_, 7 this_.medio_valor AS medio7_33_0_, this_.estado AS estado33_0_, 8 this_.estado_desc AS estado9_33_0_, 9 this_.fec_prevista AS fec10_33_0_, 10 this_.fecha_envio AS fecha11_33_0_, 11 this_.rec_cliente AS rec12_33_0_, 12 this_.fechacrea AS fechacrea33_0_, 13 this_.fechamodif AS fechamodif33_0_, 14 this_.flagbloqueo AS flagblo15_33_0_, 15 this_.flagborrado AS flagbor16_33_0_, 16 this_.comentarios AS comenta17_33_0_, 17 this_.horaenvio AS horaenvio33_0_, this_.emisor AS emisor33_0_, 18 this_.identificador AS identif20_33_0_, 19 this_.medio_valor_desc AS medio21_33_0_, 20 this_.debug_trace AS debug22_33_0_, 21 this_.formulario_id AS formulario23_33_0_, 22 this_.campanya_id AS campanya24_33_0_, 23 this_.contacto_id AS contacto25_33_0_, 24 this_.usuariocrea AS usuario26_33_0_, 25 this_.usuariomodif AS usuario27_33_0_, 26 this_.cliente_id AS cliente28_33_0_, 27 this_.camppos_id AS camppos29_33_0_, 28 this_.actividad_id AS actividad30_33_0_, 29 this_.tagcliconext_id AS tagclic31_33_0_ 30 FROM crm.crm_envios this_ 31 where this_.estado = 'Enviado' 32 and this_.medio = 3482 AND this_.fecha_envio <= '02/04/10 00:00:00') 33 WHERE ROWNUM <= 500; no rows selected Execution Plan ---------------------------------------------------------- Plan hash value: 1577868436 ------------------------------------------------------------------------------------------------ | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ------------------------------------------------------------------------------------------------ | 0 | SELECT STATEMENT | | 500 | 171K| 2425 (1)| 00:00:30 | |* 1 | COUNT STOPKEY | | | | | | |* 2 | TABLE ACCESS BY INDEX ROWID| CRM_ENVIOS | 500 | 171K| 2425 (1)| 00:00:30 | |* 3 | INDEX RANGE SCAN | ESTADOENVIO_IDX | | | 104 (0)| 00:00:02 | ------------------------------------------------------------------------------------------------ Predicate Information (identified by operation id): --------------------------------------------------- 1 - filter(ROWNUM<=500) 2 - filter(TO_NUMBER("THIS_"."MEDIO")=3482 AND "THIS_"."FECHA_ENVIO"<='02/04/10 00:00:00') 3 - access("THIS_"."ESTADO"='Enviado') Statistics ---------------------------------------------------------- 1 recursive calls 0 db block gets 138277 consistent gets 45240 physical reads 0 redo size 2629 bytes sent via SQL*Net to client 488 bytes received via SQL*Net from client 2 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 0 rows processed
Can someone show me that some light on what changes made Advisor to select to reach that way, or how can I watch this that select uses?
Any help will be appreciate
Thank youThe Adviser does not create a new SQL statement - what it has done is create a SQL profile - to accept SQL profile for the task of tuning above:
execute dbms_sqltune.accept_sql_profile(task_name => 'SQL_TUNING_1266335308111', replace => TRUE);
as mentioned in the above report...
A sql profile applys tips for change (correct) the cost of certain operations - and, to change the execution path chosen by the optiimizer.
-
SQL Tuning sets and SQL Tuning Advisor.
Hello
We run oracle11g r2 where under win server 2008 R2.
How can I find out when Tuning SQL and SQL Tuning games advisors are enabled in my database.
Is Oracle11g has default setting YES for this tuning packs
Thank you
It seems you found somone activated of sets and the setting of advisers. as others have said, theyre part of the D & T and theyre always there but only, you become eligible for a permit after that you use. This will tell you the first time they have been used if at all, the key here for you field be FIRST_USAGE_DATE that must be completed only if detected_usages > 0
fixed lines 180
Col name format a30
SELECT name, version, detected_usages, FIRST_USAGE_DATE, last_usage_date
of DBA_FEATURE_USAGE_STATISTICS
where upper (NAME) like '% % TUNING '.
-
I wanted to use the SQL in the SQL worksheet setting feature. The DBA privilege me ADVISE system. But when I tried to use the feature, I get the following errors:
Then I get this right after the other:An error was encountered performing the requested operation: ORA-06550: line 20, column 101: PLS-00103: Encountered the symbol "ANYDATA" when expecting one of the folllowing: .(),*%&=-+</> at in is mod remainder not rem <an exponenet (**) <> or != or ~= >= <> and or like LIKE2_ LIKE4_LIKEC_between|| multiset member SUBMULTISET_ The symbol "." was substituted for "ANYDATA" to continue. ORA-6550: line 20, column 140: PLS-00103: Encountered the symbol "ANYDATA" when expecting one of the folllowing: .(),*%&=-+</> at in is mod remainder not rem <an exponenet (**) <> or != or ~= >= <> and or like LIKE2_ LIKE4_LIKEC_between|| mul ORA-6550:line 20, column 179: PLS-00103: Encountered the symbol "ANYDATA" when expecting one of the folllowing: .(),*%&=-+</> at in is mod remainder not rem <an exponenet (**) <> or != or ~= >= <> and or like LIKE2_ LIKE4_LIKEC_between|| multiset 06550,00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: Vendor code 6550
Can someone help me please? I'm not a DBA, so I confused these error codes.An error was encountered performing the requested operation: ORA-13605: The specified task or boject staName12325 does not exist for the current user. ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86 ORA-06512: at "SYS.PRVT_ADVISOR", line 4841 ORA-06512: at "SYS.DBMS_SQLTUNE", line 1093 ORA-06512: at line 2 13605.0000 - "The specified task or object %s does not exist for the current user." *Cause: The user attempted to reference an advisor task or object using a anme that does not exist in the Advisor repository. *Action: Adjust the name and retry the operation. Vendor code 13605
Oracle SQL Developer 3.0.04 Build hand - 04.34
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0
RobertHi Robert,.
SQL Setup seems stifling bind variables of your query clause-BETWEEN to_date function. Substitute a literal date string, and it seems to handle well. What is a solution?
I ping the responsible developer and I hope he has time to investigate and to connect to a bug.
Kind regards
Gary Graham
SQL development team -
Need to learn the code of PL/SQL tuning
Hi all
I already asked this question earlier, but the link provided was too difficult to understand, I really grateful if someone suggest me the good and simple link or presentation for mentioned topic question.
In addition, I just want to learn some basic for this. Appreciate your response. Thank you
Concerning
Muzz
I already asked this question earlier, but the link provided was too difficult to understand, I really grateful if someone suggest me the good and simple link or presentation for mentioned topic question.
Why PL/SQL tuning?
The best advice re PL/SQL is to AVOID at all costs. Whenever possible, use SQL.
It is usually the SQL to be tuned so that sql is autonomous or in code.
As the major part of PL/SQL uses SQL to get the job done, you will be not successful tuning PL/SQL, unless you set the SQL contained in it.
Start with the Oracle documentation:
http://docs.Oracle.com/CD/B28359_01/server.111/b28274/sql_overview.htm
This chapter deals with the objectives for the development, explains how to identify the high resource SQL statements, which must be collected, offers suggestions of setting and explains how to create SQL test scenarios to solve problems in SQL.
This chapter contains the following sections:
Then, learn how to use and interpret what the Wizard Setup of Sql from Oracle can make and provide:
Update Auto SQL - 11 g Release 2 (11.2)
17 automatic SQL Tuning
This chapter examines the SQL Auto setting of the Oracle database features. Automatic tuning of SQL automates the manual process, which is complex, time consuming and repetitive.
This chapter contains the following sections:
A lot of questions of PL/SQL, you encounter will be due to one of these things:
1 poorly written SQL (see SQL tuning above)
2. use of slow-by-slow (line by line) treatment in a loop
3. poor use of collections and in bulk of treatment
4. use of the dynamic sql
All those who will take you to the SQL itself. The SQL is not set correctly if it is not possible for the PL/SQL to be tuned.
-
Hi all
Oracle 11.2.0.3
IBM Aix box
I ran sql tuning advisor manually by using procedure
sample procedure:
() DBMS_SQLTUNE.create_tuning_task
begin_snap = > 139758,
end_snap = > 139762,
sql_id = > "ct4u2889m1458"
scope = > DBMS_SQLTUNE.scope_comprehensive,
time_limit = > 60,
Task_Name = > 'Settings')
I got the message from PL/SQL procedure successfully completed.
Then I performed the task of tuning created using the procedure
EXEC DBMS_SQLTUNE.execute_tuning_task (TaskName = > 'settings');
Once again received message as PL/SQL procedure successfully completed.
But when I query using SELECT * FROM dba_advisor_log WHERE task_name = "_tuning";
I got this output in the respective, INTERRUPTED, ORA-13639 column: the current operation was interrupted because it has expired.
Any idea or suggestion, why im getting this error, should I get the FINISHED status. I even tried to increase the values of time_limit, but still no go...
Kind regards
I increased the parameter time_limit to half an hour. and his filled and got the sql tuning report...
Thank you
-
Hi all
can you please, I'm looking for what a sql tuning advisor working time is fixed in my database and how can we increase this time? .i was using sql tuning advisor but after 30 minutes I m getting error like expired .your help will be appreciated.
Thank you and best regards.
941949 wrote:
BEGIN
DBMS_SQLTUNE. SET_AUTO_TUNING_TASK_PARAMETER (parameter-online 'TIME_LIMIT', value-online '7200');
END;
/
Above a sets the deadline for the work of automatic tuning, this database run by the scheduled window. This will not effect on tuning sql id 14qd246jumhsh.
941949 wrote:
Full steps what I m try are below.so, please say where I m made a mistake.
Set serveroutput on
set linesize 200
set of 2000 pages
Set longchunksize long 1000000 1000;
Task_Name variable varchar2 (100);
Start
: task_name: = dbms_sqltune.create_tuning_task (sql_id => '& SQL_ID');
dbms_sqltune.execute_tuning_task (task_name =>: task_name);
end;
You must mention the time_limit parameter in the above procedure: dbms_sqltune.create_tuning_task - when the task was created. There is an example here: ORACLE-BASE - database Oracle 10 g automatic SQL Tuning and Automatic SQL Tuning as well.
-
The temporary and tables using SQL tuning tools
The application that I support uses temporary tables for the majority of queries... Looking at the SQL tuning advisor and more of other oracle tuning tools, they seem well managing temporary tables.
It's what Happens (from what I can tell).
(1) oracle identifies a SQL statement (or the ADMINISTRATOR only), to be tuned.
(2) the original execution statistics are saved for comparison
(3) oracle tries to find a new plan (but at this point, the temporary table is empty).
(4) it tries to execute the new plan (once again the temporary table is empty).
(5) it comparies the execution time of the new plan against the original plan
The comparison, of course, is not a reasonable comparison.
Does anyone have experience with this problem? My first thought is for 'premium' of the temporary table, then run the Advisor of tuning in the same session (hoping that it will use the values in the temporary table).
Other than that, rereading of the database seems to be the best way to adjust sql plan changes using baselines.Expected.
-
List of the SQL tuning sets without OEM
Hello.
I want to know what table is used to store the SQL tuning games/SQL tuning set names. I know that I can easily find the SQL tuning set OEM list, but I want to know about table/dynamic views.
I Googled it but not able to find the table that stores the sql tuning set of tables.
Thank you.
B. Dave
Try different words in google, I used and had to be included... in google...
the value SQL tuning oracle dictionary tables
- Information Advisor views, such as
DBA_ADVISOR_TASKS
,DBA_ADVISOR_EXECUTIONS
,DBA_ADVISOR_FINDINGS
,DBA_ADVISOR_RECOMMENDATIONS
, andDBA_ADVISOR_RATIONALE
views. - SQL tuning views of information, such as
DBA_SQLTUNE_STATISTICS
,DBA_SQLTUNE_BINDS
, andDBA_SQLTUNE_PLANS
views. - SQL Tuning Set views, such as
DBA_SQLSET
,DBA_SQLSET_BINDS
,DBA_SQLSET_STATEMENTS
, andDBA_SQLSET_REFERENCES
views. - Information about captured execution plans for statements in SQL Tuning sets are displayed in the
DBA_SQLSET_PLANS
andUSER_SQLSET_PLANS
views. - SQL profile information is displayed in the
DBA_SQL_PROFILES
view. TheTYPE
parameter indicates if the SQL profile has been created manually by the SQL Setup Assistant (ifTYPE
=MANUAL
) or automatically by the auto tuning SQL (ifTYPE
=AUTO
). - Progress of enforcement Advisor information are displayed in the
V$ADVISOR_PROGRESS
view.
- Information Advisor views, such as
-
Exception ORA when accepting SQL Tuning Set
Hello
RDBMS version: 11.2.0.1.0 & 11.2.0.4.0
OS: OEL 5 (64-bit)
I am creating a SQL tuning set and get both to do exception below. Tried to search on the forums also with the exception of the ORA, but unable to get any resolution for this exception ORA.
The following awards were made: -.
GRANT CREATE ANY SQL PROFILE TO SCOTT; GRANT DROP ANY SQL PROFILE TO SCOTT; GRANT ALTER ANY SQL PROFILE TO SCOTT; GRANT ADVISOR TO SCOTT; GRANT ADMINISTER SQL MANAGEMENT OBJECT TO SCOTT; grant execute on dbms_spm to SCOTT; grant administer sql management object to SCOTT;
DECLARE my_task_name VARCHAR2(30); my_sqltext CLOB; my_sqlprofile_name VARCHAR2(4000); BEGIN my_sqltext := 'SELECT * FROM emp'; my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_text => my_sqltext, user_name => 'SCOTT', scope => 'COMPREHENSIVE', time_limit => 60, task_name => 'my_sql_tuning_task3', description => 'Demo Task to tune a query'); DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'my_sql_tuning_task3'); my_sqlprofile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE (task_name =>'my_sql_tuning_task3', name => 'my_sql_profile'); -- Culprit for the exception --dbms_output.put_line(my_sqlprofile_name); END; / Error report - ORA-13786: missing SQL text of statement object "1" for tuning task "my_sql_tuning_task3" ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16255 ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31 ORA-06512: at "SYS.DBMS_SQLTUNE", line 7133 ORA-06512: at line 4 13786. 00000 - "missing SQL text of statement object \"%s\" for tuning task \"%s\"" *Cause: The user attempted to accept SQL profile for an object that has not a SQL text associated to it. *Action: Check the identifier of the object and retry the operation.
Would be really grateful if someone could point me in the right direction here.
TIA...
Personally, I wouldn't bother with a task of setting.
If you are lucky who will recommend a sql profile based on adjustments of cardinality which may or may not be effective.
I would just use either the COE_XFR_SQL_PROFILE. SQL script SQLT ( doc-id 1487302.1Support) or use SQL Plan baseline to apply the previous execution plan. The latter has the advantage of being able to make an evolution controlled all plans potentially better which would otherwise be generated.
You can choose the older, better plan AWR in the same database or a different database, and then transport it.
-
Tuning Advisor - recommendations
Dear Experts,
11.2.0.3 RDBMS - I ran Setup SQL for a statement and see the three recommendations:
-Collect statistics for a table
-Implement the SQL - 99% of shows benefits profile
-Creating an Index - shows about 78% benefit.
Tuning advisor recommends that a recce to implement. We should I be implemented? Also, with the SQL profile I see 'force match' option, what it means? Appreciate your help...
Thank youHello
Profile SQL is generally less preferable because
(1) fixed single query
(2) it arranges without understanding the nature of the underlying problem, i.e. There is always risk of returning question in one way or anotherOn the option 'force game' - it just means that the profile will apply not only to the sql_id you specify, but also all other sql_id which the SQL text differs only in the values of literals. For example if you create a SQL profile for
select col1 from tab1 where col2 = 'A'
then by default will not affect the plan of
select col1 from tab1 where col2 = 'B'
but with strength match option, the profile would apply to these two statements.
About creating index - you need to evaluate the benefits for this and other queries on the cost (slower DML, increased consumption of disk space). How to set up SQL cannot do this for you.
Best regards
Nikolai
Maybe you are looking for
-
Cannot wake up afer screen turned off by Power Saver on Tecra M5
Tecra M5; XP SP2.Disabled screen saver.Toshiba power saver set to turn off the monitor after 10 minutes. Once off, I can't get the monitor to turn back.I tried different combinations of keys fn and function, but nothing helped. Only solution seems to
-
Qosmio F20-136: scanned TV guide channel - save the file so you can recharge?
I have a Qosmio F20 - 136 running XP Media Center. My question is does anyone know the name of the file that has the channels scanned so that if I do a re scan and don't get all channels from the list, because of my reception antenna I can re - load
-
Not installed uninstalled trial version my original version
I recently downloaded and used the trial version of Publisher 2007, which also installed any more Office 2007 on my computer. After the end of the trial period, I uninstalled the downloaded file then, but now my original office suite that came on my
-
Value of page-level layout go BTF
JDeveloper version 11.1.1.7Project Design Patterns: Fragments of JSF with ADF task set flow as a region to the JSF pagesRequirement: Be able to assign a component to a page from a bounded flow task jspxSimplified scenario based on: model of Page cont
-
Need Urgent help on the problem of Autocad application on a virtual desktop performance
Hi allI was faced with a delicate issue with the VDI implementation that was carried out a few months back.The client uses a few applications Auto CAD on HP thin clients and portable computers.They have questions only on thin clients HP and all works