13.07.2015 Views

Oracle10g New Features Tuning and Performance ... - HrOUG

Oracle10g New Features Tuning and Performance ... - HrOUG

Oracle10g New Features Tuning and Performance ... - HrOUG

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tunning with Oracle OUTLINESAci PolajnarIS Consultant MRI d.o.o.acip@mri.siCopyright © 2006 Quest Software


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong><strong>Tuning</strong> for OutSource ApplicationsRapid growth of data causes rapid changes of conditions in our database.The lack of source code is disabling us from efective tuning <strong>and</strong>improvement of performances for OutSource applications.With Oracle OUTLINES feature, we are able to h<strong>and</strong>le such a situations to. Wecan catch queries from SGA , tune it <strong>and</strong> put the optimal solutions to theOUTLINES.Let us look all this at some examples!!4


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong>Plan Stability (1)GRANT CREATE ANY OUTLINE <strong>and</strong>GRANT SELECT ANY TABLE privilege to the schema in whichthe outlines will be createdFor example, from SYS:GRANT CREATE ANY OUTLINE TO user-nameGRANT SELECT ANY TABLE TO user-name5


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong>Plan Stability (2)Execute syntax similar to the following to designate;for example, the RBGROUP outline category.ALTER SESSION SET CREATE_STORED_OUTLINES = RBGROUP;6


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong>Plan Stability (3)Then run the application long enough to capture stored outlines for all the importantSQL statements.7


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong>Plan Stability (4)Suspend outline generation by statement:ALTER SESSION SET CREATE_STORED_OUTLINES = FALSE;8


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong>Plan Stability (5)Gather statistics with the DBMS_STATS package.9


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong>Plan Stability (6)Execute the following statement to make Oracle use the outlines in categoryRBGROUP:ALTER SESSION SET USE_STORED_OUTLINES = RBGROUP;Then run the application. With this procedure of plan stability, access paths of the SQLstatements can be used.10


<strong>Tuning</strong> <strong>and</strong> <strong>Performance</strong><strong>Tuning</strong> with QUEST SQL Optimizer ( Live )1. Grant CREATE ANY OUTLINE <strong>and</strong> GRANT SELECT ANY TABLE privilege to theschema in which the outlines will be createdFor example, from SYS:GRANT CREATE ANY OUTLINE TO user-nameGRANT SELECT ANY TABLE TO user-name2. Execute syntax similar to the following to designate; for example, the RBGROUPoutline category.ALTER SESSION SET CREATE_STORED_OUTLINES = RBGROUP;3. Then run the application long enough to capture stored outlines for all the importantSQL statements.4. Suspend outline generation by statement:ALTER SESSION SET CREATE_STORED_OUTLINES = FALSE;5. Gather statistics with the DBMS_STATS package.6. Then change the initialization parameter OPTIMIZER_MODE to CHOOSE.7. Execute the following statement to make Oracle use the outlines in categoryRBGROUP:ALTER SESSION SET USE_STORED_OUTLINES = RBGROUP;8. Then run the application. With this procedure of plan stability, access paths of the SQLstatements can be used.11


Thank youAci PolajnarIS Consultant MRI d.o.o.acip@mri.si

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!