11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

196 CHAPTER 4 ■ PERFORMANCE MANAGEMENT<strong>Access</strong>ing Intermediate ResultsAs you are probably aware, the SQL <strong>Access</strong> Advisor takes a considerable amount of time toexecute, especially when you run it in comprehensive mode. In <strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g, you canaccess the intermediate results while the advisor is still executing. This gives you the opportunityto cut short an advisor run if the intermediate results aren’t appealing to you. Similarly,if the intermediate results show evidence that the recommendations will lead to a significantbenefit, you can cut short the advisor run by interrupting it midstream.The SQL <strong>Access</strong> Advisor bases its partitioning recommendations on its analysis of a significantproportion of the workload. Thus, if you interrupt an advisor task early in the game, theadvisor may not include any base table partitioning recommendations in the intermediate results.If you decide to interrupt, wait for a substantial portion of the workload to complete so you canget the partitioning recommendations as well.To accept the intermediate results, you must formally interrupt the advisor task. The advisorwill then stop executing the task and mark it as interrupted. Following this, you can either askthe advisor to complete the recommendation process or choose to accept the recommendationsand generate scripts for implementing them.New DBMS_ADVISOR ProceduresTwo new procedures in the DBMS_ADVISOR package have a bearing on the SQL <strong>Access</strong> Advisor.These are the add_sts_ref and copy_sqlwkld_to_sts procedures.ADD_STS_REF ProcedureYou can use the add_sts_ref procedure to link a SQL <strong>Access</strong> Advisor task to the SQL tuning set.The advisor task can use this link to access the SQL tuning set for analysis purposes. Here’s thestructure of the add_sts_ref procedure:Argument Name Type In/Out Default?-------------------- -------------- --------- ---------TASK_NAME VARCHAR2 INSTS_OWNER VARCHAR2 INWORKLOAD_NAME VARCHAR2 INHere’s an example showing how to use the add_sts_ref procedure to link a task (task1) toa SQL tuning set (sts_1):SQL> exec dbms_advisor.add_sts_ref ("task1', 'hr', 'sts_1');Once you create a link between the advisor task and the SQL Tuning Advisor task, the STScan’t be altered or deleted, thus providing a stable view of the workload for the advisor.COPY_SQLWKLD_TO_STS ProcedureThe copy_sqlwkld_to_sts procedure transfers the contents of a SQL workload object to an STS. Thecopy_sqlwkld_to_sts procedure has the following attributes:

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

Saved successfully!

Ooh no, something went wrong!