欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    oracle数据库新特性之spa.ppt

    • 资源ID:6513554       资源大小:343.49KB        全文页数:26页
    • 资源格式: PPT        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    oracle数据库新特性之spa.ppt

    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 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 performance 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 recommendationsSchema 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 steps 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 of 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 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 statistics.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,Manually 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 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 and 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 can 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 seriallyBuilds 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 workflows: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_name=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 performance 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,-execution_type=TEST EXECUTE,execution_name=after);,SELECT dbms_sqlpa.report_analysis_task(task_name=:tname,type=text,section=summary)FROM dual;,EXEC dbms_sqlpa.execute_analysis_task(task_name=:tname,execution_type=COMPARE PERFORMANCE);,SELECT dbms_sqlpa.report_analysis_task(task_name=:tname,type=text,section=summary)FROM dual;,Tuning Regressed SQL Statements,BEGINDBMS_SQLTUNE.CREATE_TUNING_TASK(spa_task_name=MYSPA,spa_compare_exec=MYCOMPEXEC);END;/,To tune regressed SQL statements reported by SQL Performance Analyzer,create a SQL tuning task for the SQL Performance Analyzer execution by using the DBMS_SQLTUNE.CREATE_TUNING_TASK function:,11.2,Testing Database Upgrades:Oracle9i Database and Oracle Database 10g Release 1,SQL Performance Analyzer supports testing database upgrades of Oracle9i and Oracle Database 10g Release 1,to Oracle Database 10g Release 2 and later releases.Execute the SQL tuning set on the upgraded database remotely over a database link.The production system which you are upgrading from should be running Oracle9i or Oracle Database 10g Release 1.The test system which you are upgrading to should be running Oracle Database 10g Release 2(10.2.0.2)or a newer release.Set up a separate system for SQL Performance Analyzer:Oracle Database 11g Release 1(11.1.0.7)or a later release.,Testing Database Upgrades:Oracle9i Database and Oracle Database 10g Release 1,To use SQL Performance Analyzer in a database upgrade from Oracle9i or Oracle Database 10g Release 1 to a newer release,perform the following steps:1.Enable the SQL Trace facility on the production system.2.On the production system,create a mapping table.3.Move the SQL trace files and the mapping table from the production system to the SQL Performance Analyzer system.4.On the SQL Performance Analyzer system,construct a SQL tuning set by using the SQL trace files.,Testing Database Upgrades:Oracle9i Database and Oracle Database 10g Release 1,5.On the SQL Performance Analyzer system:Use SQL Performance Analyzer to create a SQL Performance Analyzer task and convert the contents in the SQL tuning set into a preupgrade SQL trial that will be used as a baseline for comparison.Remotely test execute the SQL statements on the test system over a database link to build a postupgrade SQL trial.6.Compare SQL performance and fix regressed SQL statements.,Testing Database Upgrades:Oracle Database 10g Release 2 and Later Releases,SQL Performance Analyzer supports testing database upgrades of Oracle Database 10g Release 2 or a later release to any later release.Capture a SQL tuning set on the production system,then execute it twice remotely over a database link on a test system.The production system which you are upgrading from should be running Oracle Database 10g Release 2 or a later release.The test system which you are upgrading to initially should be running the same release as the production system.Set up a separate system for running SQL Performance Analyzer:Oracle Database 11g Release 1(11.1.0.7)or a later release.,Testing Database Upgrades:Oracle Database 10g Release 2 and Later Releases,Perform the following steps to use SQL Performance Analyzer in a database upgrade from Oracle Database 10g Release 2 and later releases to a newer release:1.On the production system,capture the SQL workload that you intend to analyze and store it in a SQL tuning set.2.Set up the test system so that it matches the production environment as closely as possible.3.Transport the SQL tuning set to the SQL Performance Analyzer system.4.On the SQL Performance Analyzer system,create a SQL Performance Analyzer task using the SQL tuning set as its input source.,Testing Database Upgrades:Oracle Database 10g Release 2 and Later Releases,5.Upgrade the test system.6.Remotely test execute the SQL statements a second time on the upgraded test system over a database link to build a postupgrade SQL trial.7.Compare SQL performance and fix regressed SQL statements.,SQL Performance Analyzer:Data Dictionary Views,Modified views in Oracle Database 11g:DBAUSER_ADVISOR_TASKS:Displays details about the analysis taskDBAUSER_ADVISOR_FINDINGS:Displays analysis findingsNew views in Oracle Database 11g:DBAUSER_ADVISOR_EXECUTIONS:Lists metadata information for task executionDBAUSER_ADVISOR_SQLPLANS:Displays the list of SQL execution plansDBAUSER_ADVISOR_SQLSTATS:Displays the list of SQL compilation and execution statistics,Summary,In this lesson,you should have learned how to:Identify the benefits of using SQL Performance Analyzer Describe the SQL Performance Analyzer workflow phasesUse SQL Performance Analyzer to determine performance gains following a database change,Practice 9:Overview,This practice covers the following topics:Capturing SQL Tuning SetsMigrating SQL Tuning Sets from Oracle Database 10g to Oracle Database 11gUsing SQL Performance Analyzer in an upgrade scenario,

    注意事项

    本文(oracle数据库新特性之spa.ppt)为本站会员(小飞机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开