oracle数据库新特性之spa.ppt
《oracle数据库新特性之spa.ppt》由会员分享,可在线阅读,更多相关《oracle数据库新特性之spa.ppt(26页珍藏版)》请在三一办公上搜索。
1、SQL Performance Analyzer,Objectives,After completing this lesson,you should be able to:Identify the benefits of using SQL Performance Analyzer Describe the SQL Performance Analyzer workflow phasesUse SQL Performance Analyzer to ascertain performance gains following a database change,SQL Performance
2、Analyzer:Overview,Targeted users:DBAs,QAs,application developersHelps predict the impact of system changes on SQL workload response timeBuilds different versions of SQL workload performance(that is,SQL execution plans and execution statistics)Executes SQL serially(concurrency not honored)Analyzes pe
3、rformance differencesOffers fine-grained performance analysis on individual SQLIs integrated with SQL Tuning Advisor to tune regressions,SQL Performance Analyzer:Use Cases,SQL Performance Analyzer is beneficial in the following use cases:Database upgradesImplementation of tuning recommendationsSchem
4、a changesStatistics gatheringDatabase parameter changesOS and hardware changes,Using SQL Performance Analyzer,Capture SQL workload on production.Transport the SQL workload to a test system.Build“before-change”performance data.Make changes.Build“after-change”performance data.Compare results from step
5、s 3 and 5.Tune regressed SQL.,Step 1:Capture SQL Workload,Database Instance,Productiondatabase,Cursor cache,SQL Tuning Set(STS)is used to store SQL workload.Includes:SQL TextBind variablesExecution plansExecution statisticsIncremental capture is used to populate STS from cursor cache over a period o
6、f time.STSs filtering and ranking capabilities filter out undesirable SQL.,Incremental capture,Productiondatabase,Testdatabase,Step 2:Transport to a Test System,Copy SQL Tuning Set to staging table(“pack”).Transport staging table to test system(data pump,DB link,etc).Copy SQL Tuning Set from staging
7、 table(“unpack”).,Database instance,Cursor cache,Database instance,Step 3:Build Before Change Performance Data,Before change,SQL performance version is the SQL workload performance baseline.SQL performance=execution plans+execution statisticsTest/execute SQL in STS:Produce execution plans and statis
8、tics.Execute SQL serially(no concurrency).Every SQL is executed at least twice.Skip DDL/DML effects.Explain plan SQL in STS generates only SQL plans.,Testdatabase,Database instance,Beforechanges,Test/execute,11.2 update,Step 4:Implement Planned Change andStep 5:Build After-Change Performance Data,Ma
9、nually implement the planned change:Database upgradeImplementation of tuning recommendationsSchema changesStatistics gathering Database parameter changesOS and hardware changesReexecute SQL after change:Test/execute SQL in STS to generate SQL execution plans and statistics.Explain plan SQL in STS to
10、 generate SQL plans.,Testdatabase,Database instance,After changesimplemented,Afterchanges,Step 6:Compare and Analyze Performance andStep 7:Tune Regressed SQL,Rely on user-specified metric to compare SQL performance:ELAPSED_TIME,BUFFER_GETS,DISK_READS,.Calculate impact of change on individual SQLs an
11、d SQL workload:Overall impact on workload Net SQL impact on workloadUse SQL execution frequency to define a weight of importance.Detect improvements,regressions,and unchanged performance.Detect changes in execution plans.Recommend running SQL Tuning Advisor to tune regressed SQLs.Analysis results ca
12、n be used to seed SQL Plan Management baselines.,Testdatabase,Database instance,Compareanalysis,Regression,Improvement,SQL Tuning Advisor,Quiz,Which of the following does SQL Performance Analyzer perform?Tunes regressionsProvides before-and-after execution statisticsExecutes SQL statements seriallyB
13、uilds different versions of SQL workload performance,Accessing SQL Performance Analyzer,Use Enterprise ManagerUse the DBMS_SQLPA package,Using Enterprise Manager to Access SQL Performance Analyzer,Access SQL Performance Analyzer on the Software and Support tab.Select one of the five types of workflo
14、ws:Upgrade from 9i or 10.1Upgrade from 10.2 or 11gParameter ChangeExadata SimulationGuided WorkflowTune regressing statements by invoking SQL Tuning Advisor.Prevent regressions by using SQL plan baselines.,SQL Performance Analyzer:PL/SQL Example,exec:tname:=dbms_sqlpa.create_analysis_task(-sqlset_na
15、me=MYSTS,task_name=MYSPA);,exec dbms_sqlpa.execute_analysis_task(task_name=:tname,-execution_type=TEST EXECUTE,execution_name=before);,SELECT dbms_sqlpa.report_analysis_task(task_name=:tname,type=text,section=summary)FROM dual;,Create the tuning task:Execute the task to build the before-change perfo
16、rmance data:Produce the before-change report:,After making your changes:Create the after-change performance data:Generate the after-change report:Compare the task executions:Generate the analysis report:,SQL Performance Analyzer:PL/SQL Example,EXEC dbms_sqlpa.execute_analysis_task(task_name=:tname,-
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- oracle 数据库 特性 spa
![提示](https://www.31ppt.com/images/bang_tan.gif)
链接地址:https://www.31ppt.com/p-6513554.html