How to use Tuning Pack for SQL tuning
We're just getting started with 10g, and I'm more familiar with 9i. In OEM 9i, there was something called Oracle SQL Analyze. It allowed you to work on a problem SQL statement, adding hints, making other changes, etc., and then you could easily compare the plan for two versions of a query. You could also execute right from there and it'd let you click on a tab to view the statistics. You could compare the statistics for two versions of the same statement.
I don't see anything like this in 10.1 GC, and that's with both the Diagnostic and Tuning Packs activated. There are a number of ways you can identify an SQL for analysis, then get an explain plan, then get some recommendations. But I don't see anything that allows you to add hints, compare different versions of the explain plan, or compare the statistics for different versions of a statement.
Am I missing something?
Thanks.
Dave
Rodney,
Thanks for the reply. Yes, I agree, the Java console which runs directly on Windows is quite limited. Change Manager is there, as you indicated. However, MetaLink note 277066.1 indicates that "Tuning Pack Functionality" is also available in the Java version, and I don't see any of it there.
What I'm looking for is a framework for testing different versions of an SQL statement. I want to be able to execute the current version of a statement and, for example, a modified version with a hint added. I want to be able to see at least the basic statisitics comparing the two exections (e.g., elapsed time, logical reads, physical reads). This was possible with SQL Analyze in 9i, but I can't find anything like it in 10g.
I have found both the 10g advisors you mentioned and they do seem to work, but they don't provide the same flexibility and power for working on statement tuning apart from what the advisors recommend.
Thanks for all the suggestions/ideas...
Dave
Similar Messages
-
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 -
How to use 'IN' expression for SQL in DB adapter
Hi,
I am working on BPEL PM 10.1.3.3 and need to configure db adapter to get multiple values for one parameter similar to " where deptid in ('1,2,3)".
While configuring the adapter I am not able to find any such option. Also I need to use custom SQL. I have already tried SQL given below
select deptname from dept where dept in (#deptID)
This type of SQL generates an error. I am sure there should be a way to achieve this but donot know how to :(
-AAgThis is not possible. You should program on advance the amount of IN paramaters
IN (#p1, #p2, #p3, #p4)
or
IN (#p1, NVL(#p2, #p1), NVL(#p3, #p1), NVL(#p4, #p1)) -
How to use evaluate function for sql server function
Hi Team,
We have imported a column(date dtat type) from SQL server cube . By default it imported as varchar,. We have three option in physical layer for this column(Varchar,Intiger,unknown)
So we want to convert this column into date.can we use evaluate or there is any option to do that.?Hi,
I am not sure your requirement. But how pass evaluate function obiee?
syntax:- EVAULATE('your db function(%1,%2)', parameter list)
here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
following exapmples are for ORACLE db,
ex1: EVALUATE('upper(%1)', 'satya ranki reddy') gives the result as -> SATYA RANKI REDDY
ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
you also can call the user-defined functions through evaulate
EVALUATE('functioname(%1,%2), column1, column2)
the above function has 2 parameters to be inputted
Hope this help's
Thanks
Satya -
Can DBMS_ADVISOR package be used for SQL Tuning Advisor ?
Can DBMS_ADVISOR package be used for SQL Tuning Advisor ?
SQL> SELECT * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production -
Can some one tell me the tuning tips for sql statements, please.
Thanks
AjwatYes get EP (explain plan) going and try add /*+ RULE */ hint to your SIUD commands (Select/Insert/Update/Delete) . This changes the optimizer mode from CHOOSE to RULE, I find RULE uses indexes more often than CHOOSE (see example below).
select /*+ RULE */ c1,c2,c3 from t1 where n1=123
--[EP 1 results]
SELECT STATEMENT Optimizer=HINT: RULE
TABLE ACCESS (BY INDEX ROWID) OF T1
INDEX (RANGE SCAN) OF I_NU_T1_N1 (NON-UNIQUE)
select c1,c2,c3 from t1 where n1=123
--[EP 2 results]
SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=12)
TABLE ACCESS (FULL) OF T1 (Cost=1 Card=1 Bytes=12)
Look for any FULL TABLE SCAN entries in your EP results and try to get rid of them. As the above example shows, switching to RULE uses the index on table T1.
There are a while pile of other HINTS listed as well (other than just RULE) which are at ...
http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a87503/hintsref.htm#4894
There is a whole section on Oracle Performance at the following address...
http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a87503/toc.htm
the Hints section is Chapter 5
There are many more things to tuning tips, but by far, getting your SQL to use indexes is the primary one and you'll have to get EP results to see which indexes are being used (the FREE Toad program shows EP results nicely).
Hope this helps,
Tyler -
How to use OEM to moniter sql server 2000
Hi,
I need to learn How to use OEM to moniter sql server 2000.
Can anyone help me and give me some website or documents
to read?
So I can learn to do this job.
Thanks.See Note 115302.1 in Metalink.oracle.com
in how to use OEM Diagnostic pack addon for SQL Server
Or search for
oem "user events"
to build your own monitor script. -
How to use execute immediate for character string value 300
how to use execute immediate for character string value > 300 , the parameter for this would be passed.
Case 1: When length = 300
declare
str1 varchar2(20) := 'select * from dual';
str2 varchar2(20) := ' union ';
result varchar2(300);
begin
result := str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || ' ';
dbms_output.put_line('length : '|| length(result));
execute immediate result;
end;
/SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
length : 300
PL/SQL procedure successfully completed.
Case 2: When length > 300 ( 301)
SQL> set serveroutput on size 2000;
declare
str1 varchar2(20) := 'select * from dual';
str2 varchar2(20) := ' union ';
result varchar2(300);
begin
result := str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || str2 ||
str1 || ' ';
dbms_output.put_line('length : '|| length(result));
execute immediate result;
end;
/SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 6result varchar2(300);Answer shouldn't be here ? In the greater variable ?
Nicolas. -
How to use Batch operation for two xsodata services?
Hi All,
I have two xsodata services. How to use submit batch for two xsodata services
Thanks,
MjGateway Batch Calls from SAPUI5
-
How to use same actions for differ pop-up
Hi gurus,
I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
Plz sugges me.
<b>Points will be sured.</b>
Sanket sethiHi,
Take one integer value attribute in the context of view
when you r performing action on POP1 set it's value to 1
when you r performing action on POP2 set it's value to 2
create one method which receives integer argument, say diaplay(int a)
In the action call display(wdContext.currentContextElement().get<intvariable>()) by passing the value in the context attribute
in display() method, Check the value of integer variable..
if it is 1 then perform action related to POP1
if it is 2 then perform action related to POP2
Regards
LakshmiNarayana -
How to use same actions for differ pop-up buttons
Hi gurus,
I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
Plz sugges me.
<b>Points will be sured.</b>
Sanket sethiHi ,
u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
regards
Yash -
How to Use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA
Hi ,
How to use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA.
May i know what are the input parameters & fields mandatory
for each Table structures ct_data , ct_datax , it_descript , it_longtext.
Can any one explain me Step by Step Process.
B'cos i tried with below code. Equipment is not getting created.
wa_itab-equipment_ext = '000000000100000001'.
wa_itab-descript = 'Test 2 -> Lube Oil Pump'.
wa_itab-text_language = 'EN'.
wa_itab-sdescript = 'Short Description'.
APPEND wa_itab TO it_itab.
CLEAR wa_itab.
LOOP AT it_itab INTO wa_itab.
ct_data-ta_guid = '000000000000000001'.
ct_data-equipment_ext = wa_itab-equipment_ext.
ct_data-descript = wa_itab-descript .
ct_data-valid_date = sy-datum.
ct_data-equicatgry = 'M'.
APPEND ct_data.
CLEAR ct_data.
ct_datax-ta_guid = '000000000000000001'.
ct_datax-equipment_ext = 'X'.
ct_datax-equipment = 'X'.
APPEND ct_datax.
CLEAR ct_datax.
it_descript-ta_guid = '000000000000000001'.
it_descript-text_language = wa_itab-text_language.
it_descript-descript = wa_itab-sdescript .
APPEND it_descript.
CLEAR it_descript.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'LTXT'.
it_longtext-text_line = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'aaaaaaaaaaaaaaa'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'bbbbbbbbbbbb'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'cccccccccccccccc'.
APPEND it_longtext.
CLEAR it_longtext.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
call BAPI-function in this system
CALL FUNCTION 'BAPI_EQUIPMENT_SAVEREPLICA'
TABLES
ct_data = ct_data
ct_datax = ct_datax
it_descript = it_descript
it_longtext = it_longtext
return = return
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE : 'Successful'.
ENDIF.
IF NOT return IS INITIAL.
LOOP AT return.
IF return-type = 'A' OR return-type = 'E'.
WRITE : 'Error'.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH return.
ENDLOOP.
Regards
SUrendarHi ,
How to use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA.
May i know what are the input parameters & fields mandatory
for each Table structures ct_data , ct_datax , it_descript , it_longtext.
Can any one explain me Step by Step Process.
B'cos i tried with below code. Equipment is not getting created.
wa_itab-equipment_ext = '000000000100000001'.
wa_itab-descript = 'Test 2 -> Lube Oil Pump'.
wa_itab-text_language = 'EN'.
wa_itab-sdescript = 'Short Description'.
APPEND wa_itab TO it_itab.
CLEAR wa_itab.
LOOP AT it_itab INTO wa_itab.
ct_data-ta_guid = '000000000000000001'.
ct_data-equipment_ext = wa_itab-equipment_ext.
ct_data-descript = wa_itab-descript .
ct_data-valid_date = sy-datum.
ct_data-equicatgry = 'M'.
APPEND ct_data.
CLEAR ct_data.
ct_datax-ta_guid = '000000000000000001'.
ct_datax-equipment_ext = 'X'.
ct_datax-equipment = 'X'.
APPEND ct_datax.
CLEAR ct_datax.
it_descript-ta_guid = '000000000000000001'.
it_descript-text_language = wa_itab-text_language.
it_descript-descript = wa_itab-sdescript .
APPEND it_descript.
CLEAR it_descript.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'LTXT'.
it_longtext-text_line = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'aaaaaaaaaaaaaaa'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'bbbbbbbbbbbb'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'cccccccccccccccc'.
APPEND it_longtext.
CLEAR it_longtext.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
call BAPI-function in this system
CALL FUNCTION 'BAPI_EQUIPMENT_SAVEREPLICA'
TABLES
ct_data = ct_data
ct_datax = ct_datax
it_descript = it_descript
it_longtext = it_longtext
return = return
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE : 'Successful'.
ENDIF.
IF NOT return IS INITIAL.
LOOP AT return.
IF return-type = 'A' OR return-type = 'E'.
WRITE : 'Error'.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH return.
ENDLOOP.
Regards
SUrendar -
How to use Web Serivce for not jsr 172 phone
Hi:
Is anyone know, how to use web service for phones that only have standard J2ME package installed (without jsr 172 web service packagenstalled)?
thank youHi,
I think you need to write the code for this from scratch (built on top of existing HTTP functionality). There may be open-source J2ME code you could use. I've never tried this so I'm afraid I don't know any more. But maybe that is what you were asking... i.e. does anyone have code that does this already...
Tx,
Sam -
How to use 2 GL for loss made on asset retirement w/o revenue ?
how to use 2 GL for loss made on asset retirement w/o revenue.
hello everyone
i have some trouble.
my company want to use 2 GL account for asset retirement
example some time use GL 6500001 some time use 6500002
in standard configuration AO90 , field loss made on asset retirement w/o revenue, there is only one field.
so i can use only one G/L.
it' s not good if i must to change configuration (and transport request )every time that user need to change GL.
now i got one idea.
i know that table T095 keep account determinaton and GL account data.
so if i make program that change data from table T095 directly. i donot need to change config everytime.
but i am not sure that this way will make impact other standard program or not.
i will wait for better idea from everyone.
please help.Substitution consist of several steps each with two parts:
1- Prerequisite
2- Replacement
If the prerequisite is satisfied (TRUE), substitution (Replacement) is performed.
Transaction Code: OBBH.
Thank you
Javed -
Explain how to use standard LSMW for MM01
Can anyone explain how to use standard LSMW for MM01 Tcode.pls explain briefly.
Hi
Create a project using 0020 as method.
Max
Maybe you are looking for
-
I upgrated for the latest version of itunes and now my Macbook Pro its 1000000 time slower
I downloded some update for the Itunes, and now my Macbook Pro its toooooo slow, I dont know what do to anymore. I even reinstalled the whole system. Can anybody help me???
-
Adobe Acrobat Pro XI unability to open pdf mail attachments
Since upgrading to Adobe Acrobat Pro XI I am unable to open most pdf attachements on outlook. The message is that the file is corrupt or was encoded wrong. How do I correct this.
-
Publish to .Mac vs. Publish All to ,Mac
I am using iWeb v 1.1.2, which I know how to use and is satisfactory for my needs. I do have a question, however. What is the difference between the command "Publish to .Mac" vs. "Publish All to .Mac?" I usually use "Publish to .Mac" as this seems qu
-
How to buld Crystal report using data from Bex query
Hi, I have requirment where the end user wants the query in Crystal.I built a Bex query in Bex query designer.I would like to know how to create crystal report based onthe Bex query. Thanks, Chandra
-
BC4J datatags: is this the best way to do this?
In my BC4J JSP application, in the DataTableComponent.jsp, I want to check if a property exists on the view object. This is the best way I could come up with: String PropertyValue = (String)dsBrowse.getApplicationModule() .findViewObject(dsBrowse.get