Oracle11g standarad Edititon-Sql tuning Advisor
Hi,
Do we have provision to tune the query using sql tuning advisor in oracle 11g r1 Standard Edition SE
Thanks
mafaiz
Mafaiz,
Tuning & Diagnostic Packs are available in Enterprise Edition only
Oracle Database - Standard Edition & Diagnosis Pack???
Thanks,
Ajay More
http://www.moreajays.com
Similar Messages
-
Need help to debug SQL Tuning Advisor Error Message
Hi,
I am getting an error message while try to get recommendations from the SQL Tuning Advisor.
Environment:
Oracle Version: 11.2.0.3.0
O/S: AIX
Following is my code:
declare
my_task_name varchar2 (30);
my_sqltext clob;
begin
my_sqltext := 'SELECT DISTINCT MRKT_AREA AS DIVISION, PROMO_ID,
PROMO_CODE,
RBR_DTL_TYPE.PERF_DETL_TYP,
RBR_DTL_TYPE.PERF_DETL_DESC,
RBR_DTL_TYPE.PERF_DETL_SUB_TYP,
RBR_DTL_TYPE.PERF_DETL_SUB_DESC,
BU_SYS_ITM_NUM,
RBR_CPN_LOC_ITEM_ARCHIVE.CLI_SYS_ITM_DESC,
PROMO_START_DATE,
PROMO_END_DATE,
PROMO_VALUE2,
PROMO_VALUE1,
EXEC_COMMENTS,
PAGE_NUM,
BLOCK_NUM,
AD_PLACEMENT,
BUYER_CODE,
RBR_CPN_LOC_ITEM_ARCHIVE.CLI_STAT_TYP,
RBR_MASTER_CAL_ARCHIVE.STATUS_FLAG
FROM (PROMO_REPT_OWNER.RBR_CPN_LOC_ITEM_ARCHIVE
INNER JOIN PROMO_REPT_OWNER.RBR_MASTER_CAL_ARCHIVE
ON (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_PROMO_ID = PROMO_ID)
AND (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_PERF_DTL_ID = PERF_DETAIL_ID)
AND (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_STR_NBR = STORE_ZONE)
AND (RBR_CPN_LOC_ITEM_ARCHIVE.CLI_ITM_ID = ITM_ID))
INNER JOIN PROMO_REPT_OWNER.RBR_DTL_TYPE
ON (RBR_MASTER_CAL_ARCHIVE.PERF_DETL_TYP = RBR_DTL_TYPE.PERF_DETL_TYP)
AND (RBR_MASTER_CAL_ARCHIVE.PERF_DETL_SUB_TYP = RBR_DTL_TYPE.PERF_DETL_SUB_TYP)
WHERE ( ((MRKT_AREA)=40)
AND ((RBR_DTL_TYPE.PERF_DETL_TYP)=1)
AND ((RBR_DTL_TYPE.PERF_DETL_SUB_TYP)=1) )
AND ((CLI_STAT_TYP)=1 Or (CLI_STAT_TYP)=6)
AND ((RBR_MASTER_CAL_ARCHIVE.STATUS_FLAG)=''A'')
AND ( ((PROMO_START_DATE) >= to_date(''2011-10-20'', ''YYYY-MM-DD'')
And (PROMO_END_DATE) <= to_date(''2011-10-26'', ''YYYY-MM-DD'')) )
ORDER BY MRKT_AREA';
my_task_name := dbms_sqltune.create_tuning_task
(sql_text => my_sqltext,
user_name => 'PROMO_REPT_OWNER',
scope => 'COMPREHENSIVE',
time_limit => 3600,
task_name => 'Test_Query',
description => 'Test Query');
end;
begin
dbms_sqltune.execute_tuning_task(task_name => 'Test_Query');
end;
set serveroutput on size unlimited;
set pagesize 5000
set linesize 130
set long 50000
set longchunksize 500000
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('Test_Query') FROM DUAL;
Output:
snippet .....
FINDINGS SECTION (1 finding)
1- Index Finding (see explain plans section below)
The execution plan of this statement can be improved by creating one or more
indices.
Recommendation (estimated benefit: 71.48%)
- Consider running the Access Advisor to improve the physical schema design
or creating the recommended index.
Error: Cannot fetch actions for recommendation: INDEX
Error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
Rationale
Creating the recommended indices significantly improves the execution plan
of this statement. However, it might be preferable to run "Access Advisor"
using a representative SQL workload as opposed to a single statement. This
will allow to get comprehensive index recommendations which takes into
account index maintenance overhead and additional space consumption.
snippet
Any ideas why I am getting ORA-06502 error?
Thanks in advance
RogersBug 14407401 - ORA-6502 from index recommendation section of DBMS_SQLTUNE output (Doc ID 14407401.8)
Fixed:
The fix for 14407401 is first included in
12.1.0.1 (Base Release) -
Dear all,
We have installed oracle 11g on solaris. We have configured EM with this DB.. Is there anyway I can check a query using sql tuning advisor in oracle 11g. ? .. I tried, but I couldn't find the exact navigation ?. I need to submit th query and get the advise from sql tuninig advisor ?
Please guide
KaiOEM db console ?
Am doing this for educational purpose and not in production
kai -
Stucked between SQL Tuning Advisor and and SQL statement
Hi,
There is an important query running on my system which consists
MEMBER OF function.
At first place let me explain why i used MEMBER OF,
I am sending a string( eg : #123#124#125) to query and a function converts this string into a number array.
After then I use this number array inside my sql.
The reason I am using this structure, in order to generate a dynamic IN statement inside my sql. (IF you have any other solution that would be great)
The most important point is; when I put this statement to SQL Tuning Advisor the response is only ORA-00932: inconsistent datatypes: expected UDT got CHAR
Any answer will be greatly appreciated.
ThanksSolomon Yakobson wrote:
Object oriented stuff almost never provides better performance over relational. You should stay away from MEMBER OF if performance is a factor. Instead of:
WHERE expr MEMBER OF nested-tableI'd test:
WHERE expr IN (SELECT column_value FROM TABLE(nested-table))SY.
expr IN (SELECT COLUMN_VALUE FROM TABLE (CAST (v_type_number_table AS type_number_table)))worked like a charm. i hope tuning advisor will like it as i do.
thanks. -
I am working as a junior DBA. I tried to tune a query using SQL Tuning Advisor that is with DBMS_SQLTUNE.I have created the tuning task successfully with DBMS_SQLTUNE.create_tuning_task.But when i execute the tuning task with EXEC DBMS_SQLTUNE.execute_tuning_task() i got an error like
SQL> EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'rep_three');
BEGIN DBMS_SQLTUNE.execute_tuning_task(task_name => 'rep_three'); END;
ERROR at line 1:
ORA-00081: address range [0x60000000000A7D70, 0x60000000000A7D74) is not
readable
ORA-00600: internal error code, arguments: [kesatmGetSqlStats:optCost], [], [],
ORA-06512: at "SYS.PRVT_ADVISOR", line 1624
ORA-06512: at "SYS.DBMS_ADVISOR", line 186
ORA-06512: at "SYS.DBMS_SQLTUNE", line 1008
ORA-06512: at line 1The oracle version is Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi. The OS is HP-UX. The version is HP-UX B.11.23 U ia64.
I tried to execute DBMS_SQLTUNE as DWH user.I have granted the advisor,DROP ANY SQL PROFILE,ALTER ANY SQL PROFILE,CREATE ANY SQL PROFILE privileges and DBA roles to the DWH user. The way i ran DBMS_SQLTUNE is, first i logged in as DWH user and i tried to execute the query for getting the SQL_ID for the query. For getting the SQL_ID i selected the SQL_ID column value for the DWH user session from v$session.I kept that query executing and meanwhile i opened another session as DWH user and created the tuning task as follows
DECLARE
l_sql_tune_task_id VARCHAR2(100);
BEGIN
l_sql_tune_task_id := DBMS_SQLTUNE.create_tuning_task (
sql_id => 'b65fj39dkkb9v',
scope => DBMS_SQLTUNE.scope_limited,
time_limit => 3600,
task_name => 'rep_three',
description => 'Report Tuning');
DBMS_OUTPUT.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id);
END;
/The creation of tuning task was successful.And i executed the tuning task as follows
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'rep_three');The above mentioned errors came when i executed the tuning task.
I am also adding the query which i have tried to tune
select * from dwh.beneficiary_dim BEN_DIM,
(Select adr_dp_id,
adr_account_no,
ADR_ADDRESS_LINE_1 || ' ' ||
ADR_ADDRESS_LINE_2 || ' ' ||
ADR_ADDRESS_LINE_3 || ' ' ||
ADR_ADDRESS_LINE_4 as ADDRESS,
adr_pin_code,adr_phone_no,adr_fax_no
from dwh.beneficiary_address_dim where adr_type_id = 1) PERMANENT_ADD_DIM,
(Select adr_dp_id,
adr_account_no,
ADR_ADDRESS_LINE_1 || ' ' ||
ADR_ADDRESS_LINE_2 || ' ' ||
ADR_ADDRESS_LINE_3 || ' ' ||
ADR_ADDRESS_LINE_4 as ADDRESS,
adr_pin_code,adr_phone_no,adr_fax_no
from dwh.beneficiary_address_dim where adr_type_id = 2) BANK_ADD_DIM,
(Select adr_dp_id,
adr_account_no,
ADR_ADDRESS_LINE_1 || ' ' ||
ADR_ADDRESS_LINE_2 || ' ' ||
ADR_ADDRESS_LINE_3 || ' ' ||
ADR_ADDRESS_LINE_4 as ADDRESS,
adr_pin_code,adr_phone_no,adr_fax_no
from dwh.beneficiary_address_dim where adr_type_id = 3) NOM_GUARDIAN_ADD_DIM,
(Select adr_dp_id,
adr_account_no,
ADR_ADDRESS_LINE_1 || ' ' ||
ADR_ADDRESS_LINE_2 || ' ' ||
ADR_ADDRESS_LINE_3 || ' ' ||
ADR_ADDRESS_LINE_4 as ADDRESS,
adr_pin_code,adr_phone_no,adr_fax_no
from dwh.beneficiary_address_dim where adr_type_id = 4) CORR_ADD_DIM,
(Select adr_dp_id,
adr_account_no,
ADR_ADDRESS_LINE_1 || ' ' ||
ADR_ADDRESS_LINE_2 || ' ' ||
ADR_ADDRESS_LINE_3 || ' ' ||
ADR_ADDRESS_LINE_4 as ADDRESS,
adr_pin_code,adr_phone_no,adr_fax_no
from dwh.beneficiary_address_dim where adr_type_id = 6) MINOR_ADDRESS,
(Select rp.requestid as requestid,
decode(rp.value,'ALL','ALL','','ALL',decode(substr(rp.value,1,instr(rp.value,'|',1,1)-1),'','ALL',substr(rp.value,1,instr(rp.value,'|',1,1)-1))) as Name,
decode(rp.value,'ALL','ALL','','ALL',decode(substr(rp.value,(instr(rp.value,'|',1,1)+1),((instr(rp.value,'|',1,2))-(instr(rp.value,'|',1,1)+1))),'','ALL',substr(rp.value,(instr(rp.value,'|',1,1)+1),((instr(rp.value,'|',1,2))-(instr(rp.value,'|',1,1)+1))))) as Address,
decode(rp.value,'ALL','ALL','','ALL',decode(substr(rp.value,(instr(rp.value,'|',1,2)+1)),'','ALL',substr(rp.value,(instr(rp.value,'|',1,2)+1)))) as PAN
from disadmin.requestparameters rp, disadmin.requestparameters rps, disadmin.reportrequests rr
where rp.parameterid = 'CNAS_PARAM_VALUE'
and rr.status = 'A'
and rp.requestid = rr.id
and rp.id = rps.id) P_PARAM_VALUE,
(Select rp.requestid as requestid, rp.value as Type
from disadmin.requestparameters rp, disadmin.reportrequests rr
where rp.parameterid = 'CNAS_NAME_TYPE'
and rr.status = 'A'
and rp.requestid = rr.id) P_NAME_TYPE,
(Select rp.requestid as requestid, rp.value as Addtype
from disadmin.requestparameters rp, disadmin.reportrequests rr
where rp.parameterid = 'CNAS_ADDRESS_TYPE'
and rr.status = 'A'
and rp.requestid = rr.id) P_ADDRESS_TYPE
where ( 1= case when P_NAME_TYPE.Type = 'F' then
case when BEN_DIM.BDM_FIRST_HOLDER_NAME like DECODE(P_PARAM_VALUE.Name,'ALL','%'||BEN_DIM.BDM_FIRST_HOLDER_NAME||'%','%'||P_PARAM_VALUE.Name||'%')
or BEN_DIM.BDM_FIRST_HOLDER_SURNAME like DECODE(P_PARAM_VALUE.Name,'ALL','%'||BEN_DIM.BDM_FIRST_HOLDER_SURNAME||'%','%'||P_PARAM_VALUE.Name||'%')
then 1
else null end
else
case when P_NAME_TYPE.Type = 'ALL' then
case when (BEN_DIM.BDM_FIRST_HOLDER_NAME like DECODE(P_PARAM_VALUE.Name,'ALL','%'||BEN_DIM.BDM_FIRST_HOLDER_NAME||'%','%'||P_PARAM_VALUE.Name||'%')
or BEN_DIM.BDM_FIRST_HOLDER_SURNAME like DECODE(P_PARAM_VALUE.Name,'ALL','%'||BEN_DIM.BDM_FIRST_HOLDER_SURNAME||'%','%'||P_PARAM_VALUE.Name||'%'))
and BEN_DIM.BDM_SECOND_HOLDER_NAME like DECODE(P_PARAM_VALUE.Name,'ALL','%'||BEN_DIM.BDM_SECOND_HOLDER_NAME||'%','%'||P_PARAM_VALUE.Name||'%')
and BEN_DIM.BDM_THIRD_HOLDER_NAME like DECODE(P_PARAM_VALUE.Name,'ALL','%'||BEN_DIM.BDM_THIRD_HOLDER_NAME||'%','%'||P_PARAM_VALUE.Name||'%')
then 1
else null end
else null end
end )
and BEN_DIM.BDM_IT_PAN like DECODE(P_PARAM_VALUE.PAN,'ALL','%'||BEN_DIM.BDM_IT_PAN||'%','%'||P_PARAM_VALUE.PAN||'%')
and (1 = case when P_ADDRESS_TYPE.ADDTYPE = 1 then
case when instr(PERMANENT_ADD_DIM.ADDRESS, DECODE(P_PARAM_VALUE.ADDRESS,'ALL',PERMANENT_ADD_DIM.ADDRESS, P_PARAM_VALUE.ADDRESS)) <> 0
then 1
else null end
when P_ADDRESS_TYPE.ADDTYPE = 3 then
case when instr(NOM_GUARDIAN_ADD_DIM.ADDRESS, DECODE(P_PARAM_VALUE.ADDRESS,'ALL',NOM_GUARDIAN_ADD_DIM.ADDRESS, P_PARAM_VALUE.ADDRESS)) <> 0
then 1
else null end
when P_ADDRESS_TYPE.ADDTYPE = 4 then
case when instr(CORR_ADD_DIM.ADDRESS, DECODE(P_PARAM_VALUE.ADDRESS,'ALL',CORR_ADD_DIM.ADDRESS, P_PARAM_VALUE.ADDRESS)) <> 0
then 1
else null end
when P_ADDRESS_TYPE.ADDTYPE = 6 then
case when instr(MINOR_ADDRESS.ADDRESS, DECODE(P_PARAM_VALUE.ADDRESS,'ALL',MINOR_ADDRESS.ADDRESS, P_PARAM_VALUE.ADDRESS)) <> 0
then 1
else null end
else null end );The above query also tries to access some tables from another user DISADMIN. Could you please help me in solving this problem while using SQL Tuning Advisor ? I am the only DBA here.will the rows really be updated just by using the package?Considering DMLs
SQL> select * from test
2 /
NO
1
2
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 my_task_name VARCHAR2(30);
3 my_sqltext CLOB;
4 BEGIN
5 my_sqltext := 'insert into test values (3)';
6 my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
7 sql_text => my_sqltext,
8 task_name => 'my_sql_tuning_task');
9* end;
SQL> /
PL/SQL procedure successfully completed.
SQL> BEGIN
2 DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'my_sql_tuning_task' );
3 END;
4 /
PL/SQL procedure successfully completed.
SQL> select * from test
2 /
NO
1
2
SQL> SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_task')
2 FROM DUAL;
DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK')
GENERAL INFORMATION SECTION
Tuning Task Name : my_sql_tuning_task
Tuning Task Owner : TEST
Scope : COMPREHENSIVE
Time Limit(seconds): 1800
Completion Status : COMPLETED
Started at : 03/27/2008 05:16:14
Completed at : 03/27/2008 05:16:16
DBMS_SQLTUNE.REPORT_TUNING_TASK('MY_SQL_TUNING_TASK')
Schema Name: TEST
SQL ID : gwkmgmyj9824t
SQL Text : insert into test values (3)
There are no recommendations to improve the statement.
-------------------------------------------------------------------------------Adith -
Change automatic SQL Tuning Advisor time
Hi All,
can anyone help me in changing "automatic SQL Tuning Advisor" job timingsm because currently it is scheduled during peak hours , i want to change it to evening 6 pm daily.Because during peak hours it is taking more cpu and taking one hour.
Wed May 08 08:00:10 2013
Begin automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
Wed May 08 08:05:47 2013
thanks
MappsHello,
Here's what you can do,
Create a new window to the time you want it to run:
EXEC dbms_scheduler.create_window(window_name => 'YOUR_WINDOW_NAME',
duration => numtodsinterval(1, 'hour'),
resource_plan => 'DEFAULT_MAINTENANCE_PLAN',
repeat_interval => 'FREQ=DAILY;BYHOUR=18;BYMINUTE=0;BYSECOND=0');>
The above window would be in effect from 6 pm to 7 pm.
Then, disable automatic sql_tuning and then re-enable it to run on the window you just created:
EXEC DBMS_AUTO_TASK_ADMIN.DISABLE(client_name => 'sql tuning advisor',
operation => NULL,
window_name => NULL);>
and now set it to run to your window:
EXEC DBMS_AUTO_TASK_ADMIN.ENABLE(client_name => 'sql tuning advisor',
operation => NULL,
window_name => 'YOUR_WINDOW_NAME'); -
SQL Tuning Advisor against the session (is it poosible)
My Company customer has observed that there is job that are running longer than expected running(5 days).
They did not gave any information.they want me to run
SQL Tuning Advisor against the session running this job.
can you run sql tunning advisor against running session?
if so how
Please suggest me your valuable tips so that I approach this work properly.
DB = 11g
OS= Solaris 10>
...SQL Tuning Advisor against the session running this job.
can you run sql tunning advisor against running session?
>
SQL Tuning Advisor is run on statements and not sessions. I don't do much with SQL Tuning Advisor, but I'd consider that current running sessions a lost cause until it completes or you kill it. You can see the "estimate" of how long that current running SQL is going to take in v$session_longops. You can use a script like Tanel's sw.sql
http://blog.tanelpoder.com/2008/01/08/updated-session-wait-script/
to see what the wait interface has to say.
>
Please suggest me your valuable tips so that I approach this work properly.
>
My approach for this would be to determine what the current explain plan is and compare it to one that ran (correctly) in the past and then try to determine why it changed. (bad stats, dropped index, parameter changes, etc).
Cheers. -
SQL Tuning Advisor Recommends New Explain Plan
Hi:
I have to believe this has been asked before but didn't see it in a forum search so I'll ask here. I had SQL Tuning Advisor look at a query and it is recommending a new plan for a 50+% improvement (hazah!). The trouble is, I don't want Oracle to re-write the plan to execute the query better, I want to know how I can re-write the query to generate that more optimal plan in the first place because I have similar systems in the field that I would like to also be optimized. What are my options?
Thanks.Sorry Gaff I know where you are talking about but I don't have your answer, but it may be a good start going over the 19g reference guide for these dictionary views -
SQL> select view_name from dba_views where view_name like 'DBA%ADVISOR%' ;
VIEW_NAME
DBA_ADVISOR_DEFINITIONS
DBA_ADVISOR_COMMANDS
DBA_ADVISOR_OBJECT_TYPES
DBA_ADVISOR_USAGE
DBA_ADVISOR_TASKS
DBA_ADVISOR_TEMPLATES
DBA_ADVISOR_LOG
...Best regards. -
Enterprise Manager - sql tuning advisor , Access advisor for SQL Tuning
Hi,
NO I mean in oracle 10g you have the enterprise manager which can be used to tune sql statements using the SQL ADvisor and SQL access advisor.
I believe in oracle 10g the process of SQL Tuning is slightly easier using the Enterprise Manager ...so if some one could explain me that process...
Again thanking you in advance
regds
Manoj GokhaleHi Manoj,
tune sql statements using the SQL ADvisor and SQL access advisor.Do you have the OEM extra cost "performance pack"?
The OEM screens are fairly self-explainatory, but here are some references on the 10 SQL tuning advisors:
http://www.oracle-base.com/articles/10g/AutomaticSQLTuning10g.php
http://www.remote-dba.net/oracle_10g_tuning/t_oracle_sql_tuning_advisor_session_example.htm -
Differernce between SQL Tuning Pack and SQL Tuning Advisor, Access Advisor
Hi. all.
I have been using "TKPROF" in order to tune SQL till now.
I am learning 10g, and would like to know the difference
between "1. SQL Tuning Pack" and "2. SQL Tuning Advisor, Access Advisor".
Are they same thing? If not, what are the differences in their "functionality"?
All I know is that SQL Tuning Pack is not free, and SQL Tuning Advisor
is packed with default installation. Right???
Could you give me some html links or your "any advice and experience"?
Thanks in advance. Have a good day.
Best Regards.Hi,
There are alternatives to the Oracle tuning packs, and remember the SQL advisors are relatuively simple, finding missing indexes and recommending MV's.
A human can do a better job if you use the right techniques.
BTW, you can get a SQLTuning advisor license online for only $3k:
http://www.dba-oracle.com/oracle_news/2005_3_17_dql_tuning_access_advisor_licenses_available_online.htm
SHAMELESS PITCH! - I wrote a book that describes techniques for tuning with scripts, instead of the advisors, if you are interested:
http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm
Hope this helps. . . .
Donald K. Burleson
Oracle Press author -
Feature option request - SQL Tuning Advisor
Hi,
Love the ability we can run SQL Tuning Advisor so easily in SQL Developer, this is how it should be simple. However we can not specify a few parameter like: time_limit, task_name and description. Would be helpful to have these options, especially increasing the time_limit option!At least the limit will be increased: 3.0 Tuning Advisor Times Out
Regards,
K. -
[OCP exam] doubt about Automatic SQL Tuning Advisor
Hi,
Sorry for my poor english.
I am currently preparing for the OCP 11g exam.
For that, I have bought some training tools to help me prepare the exam.
But, in the chapter related to the SQL tuning advisor, some explanation really confuse me .
Extract :
<<
the SQL automatic tuning job runs every night during the maintenance window.
By default, the job makes SQL profile recommendations, tests them, and automatically implements them if they provide better performance improvement)
>>
I was persuaded it was the opposite.
I check several databases/documentation, and it's seems to be always the opposite.
By default,new sql profile are tested but not implemented automatically (you have to set a parameter ACCEPT_SQL_PROFILES TO TRUE to activate this option)
But the exam is validated on oracle 11.2.0.1, and I only have 11.2.0.2/11.2.0.3 db available.
So may be oracle changed the value of the default parameter in the new releases.
Can someone confirm if I am right or not ?I would rather accept what is in the documentation:
"If a SQL profile is recommended, the database tests the new profile by executing the SQL statement both with and without the profile. If the performance improvement improves at least threefold, then the database accepts the SQL profile, but only if the ACCEPT_SQL_PROFILES task parameter is set to TRUE. Otherwise, the automatic SQL tuning reports merely report the recommendation to create a SQL profile." Automatic SQL Tuning
"If automatic implementation of SQL profiles is enabled (the default is disabled), then the database implements any SQL profiles that promise a great performance benefit. The implementation occurs at tuning time so that the database can immediately benefit from the new plan. You can enable or disable automatic implementation by using the SET_AUTO_TUNING_TASK_PARAMETER API to set the ACCEPT_SQL_PROFILES parameter." DBMS_AUTO_SQLTUNE -
Reg: SQL Tuning Advisor -
Hi Experts,
A quick question regarding this utility: SQL Tuning Advisor.
Does this need any special license to use?
Or, any special Grants/Privileges required for it?
Please provide pointers for this.
-- RanitOr, any special Grants/Privileges required for it?
Grant-wise , a user needs the privilege ADVISOR -
SQL tuning advisor recommnds to create SYS_OP_C2C function based index
I have a large table and one index on it. I use some tool to populate data, this tool simple submits the sql to Oracle DB and it does NOT use use index for queries. When I run the sql tuning advisor it recommends to create additional index and use SYS_OP_C2C function, which I do not want.
When I run the query via sql plus it picks up the index.
Have any of you come across, why its recommending this additional non-sense?
create index abc.xxxx on this_table(SYS_OP_C2C("this_column"));
ThanksThe internal Oracle function SYS_OP_C2C performs conversion from one character set to another character set - C(haracterSet)2C(haracterSet). There are situations when one will see this conversion going on without explicit command as in this case what should be a sign that the data types are not the same and implicit conversion is taking place and this might be also a problem from performance perspective as it may disable index usage.
Make sure you the characterset and nls defined of any of the database and tool are same.
Make sure the data type of the column on the index is same as database.
Confirm with ETL vendor for your database support and any patches etc.
Optimizer will only advise to use that function when characterset or data type does not match.
Thanks,
TaraChand -
What is this SQL Tuning Advisor's Advice means
HI ,
I am Tuning a query wit hthe help of ORACLE 10 g 's SQL Tuning Advisor.I got the following recommendation .
**Consider removing the disconnected table or view from this statement or add a join condition which refers to it.**
I didn't understand what does this mean.
Can anyone please help me
Thanks,
Pramod.
Edited by: Pramod Garre on Jul 15, 2009 6:20 AMSimply saying if i apply that profile i will get Good plan.But I want to change the SQL itself rather than applying profile.in that case what can be done.Automatic SQL Tuning deals with this problem with its SQL Profiling capability. The Automatic Tuning Optimizer creates a profile of the SQL statement called a SQL Profile, consisting of auxiliary statistics specific to that statement. The query optimizer under normal mode makes estimates about cardinality, selectivity, and cost that can sometimes be off by a significant amount resulting in poor execution plans. SQL Profile addresses this problem by collecting additional information using sampling and partial execution techniques to verify and, if necessary, adjust these estimates.During SQL Profiling, the Automatic Tuning Optimizer also uses execution history information of the SQL statement to appropriately set optimizer parameter settings, such as changing the OPTIMIZER_MODE initialization parameter setting from ALL_ROWS to FIRST_ROWS for that SQL statement.
If you want to change the SQL, You can re-write the SQL and evaluate the Performance recommendations SQL tuning Advisor.
Maybe you are looking for
-
ArrayList and double[]
private double[] findAverageFace(ResultSet rs, int rows){ String path; Scanner scanner; int picn = 0; double[] avgFace = new double[rows * rows]; try{ //System.out.println("scanning the result set")
-
Hi I recently purchased a new mac computer and would like to sync the music off my iPhone to my new mac.However, my phone and my new mac have different apple Ids.The PC which my phone is synced and has the same apple ID but does not let me transfer t
-
F.27 account statement clearing column
hi, i do not understand what is this clearing column in the account statement. can anyone explain. does it mean if the document number is shown, it is still open item that yet to be moved to cleared item during the account statement key date? let say
-
Why is Courier New being sub'ed with Times New Roman saving a PDF to MS Word using Acrobat X
I am using Acrobat X to save a PDF with CourierNewPSMT to MS Word. When the Word document is created, Courier New is being subsititued with Times New Roman. thanks
-
Problem connecting to Adobe servers
Hi there and thanx for your help. DW CS5 on Windows 7 Ulitmate For some reason I cannot connect to the Adobe servers. I have perfect connection to the internet with Windows firewall turned off. I managed to connect some time ago but now I cannot. I h