热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

使用OEM分析占用资源较多的sql

顶层SQL2004年10月27日下午03时53分50秒
Oracle Enterprise Manager
 



Elapsed Time
Description
This is the amount of total elapsed time that has been used for all executions of this SQL cursor. This is a useful metric in tuning SQL. This time number includes both CPU and wait time. Wait time may include time spent waiting for I/O, or a particular Oracle wait event such as the shared pool latch. Further investigation on how to best tune a particular SQL statement can be done by using the Explain Plan drilldown, or if you are on NT, the Tune SQL Statement drilldown as well. Data Source:
select elapsed_time from v$sql
User Action:
 If the SQL cursor is performing poorly, most likely the elapsed time will be high. Determine how much of the elapsed time is CPU or wait related. Tune the statement accordingly.


Top SQL
This chart provides the ability to identify and show the details of the top
25 (default) resource consuming SQL statements in the shared pool's
library cache. The default count of returned rows (25) and SQL sort
metric can be changed as required. In addition, there are 25 filters that
can be applied to allow a highly customized view of the SQL cache.
For instance, you could create a Top SQL chart that shows the top 50
SQL statements performing more than 1000 disk reads by a particular
user against a particular table or view, etc. Up to 10 filters can be
applied simultaneously in the same query.
Once the list of top resource consuming SQL statements has been
retrieved you can double click on one to get a detailed list of statistics
and full text for a particular statement. Further investigation on how to
best tune a particular SQL statement can be done by using the Explain
Plan drilldown, or if you are on NT, the Tune SQL Statement drilldown
as well.
Improving SQL performance is usually the most effective way for
improving application performance. In identifying statements with the
most potential to improve performance, you may want to consider the
statements with the highest buffer gets or physical reads. Buffer gets,
or logical reads, is one of the contributors to CPU time, as it requires
locating and retrieving buffers from the cache. Looking at poor
performing SQL statements by physical reads gives you an overview of
the number of read requests that resulted in access to datafiles on disk
for each statement.
Another factor worth considering is the frequency at which the
statement is executed. A statement with the a high number of buffer
gets or physical reads may only be executed once a day, far less than
another statement with a lower number of buffer gets that is executed
many thousands of times a day.
There are numerous reasons why a query would result in excessive
buffer gets; for example, a full table scan is being performed.
To help further diagnose a potential problem, a number of drilldown
charts are available including:
PDF created with pdfFactory Pro trial version www.pdffactory.com
Tables Referenced by this Query: Lists tables
referenced by this query as well as various optimizer
statistics.
Top SQL (Physical Reads): Presents SQL sorted by
Physical Reads.
Top SQL (Buffer Gets): Presents SQL sorted by Buffer
Gets.
Top SQL (Sorts): Presents SQL sorted by Sorts.
Tuning these statements will result in less CPU time for the
application. Execution count is also important when determining which
SQL statement should be tuned first. The statement with the highest
buffer get count may be executed once a day, far less often than
another statement in the list. Tuning the SQL statement with the
highest count may not produce as much of an improvement for the
application or system in this case as tuning the statement that is
executed much more frequently.
This chart will identify the SQL statements that are performing the
most buffer gets. There could be many reasons why a query is
performing these buffer gets, with full table scans being a common
culprit. To help further diagnose the cause of the problem there are
number of drilldown charts available. The SQL shown on this chart is
limited to a fixed number of characters. To see which tables this query
references and to check on the validity statistics used by the
optimizer, use the Tables Referenced by this Query Chart. To see SQL
sorted by Physical Reads, use the Top SQL (Physical Reads) Chart.
Further investigation on how to best tune a particular SQL statement
can be done by selecting any one of SQL statements listed and using
the Explain Plan drilldown, or if you are on NT, the Tune SQL
Statement drilldown as well.
To determine which session, program or application is responsible for
executing a particular SQL statement, you can use the Sessions
Currently Executing this SQL Statment drilldown. This will return a list
of sessions that are currently executing the selected SQL statement. If
there are no sessions executing the SQL statement at current
moment, no data will be returned.
This chart includes the following data items:
SQL Text
PDF created with pdfFactory Pro trial version www.pdffactory.com
Disk Reads Per Execution
Buffer Gets Per Execution
Disk Reads
Buffer gets
Executions
Buffer Gets Per Row
Buffer Cache Hit Ratio
Sorts
Shareable Memory
Rows Processed
Parse Calls Per Execution
Parse Calls
Loads
Persistent Memory
Runtime Memory
Loaded Versions
Open Versions
Users Opening
Users Executing
PDF created with pdfFactory Pro trial version www.pdffactory.com
Invalidations
Child Number
Optimizer Mode
Parsing User Id
Parsing Schema Id
Kept Versions
Address
Module
Module Hash
Action
Action Hash
Serializable Aborts
Outline Category
CPU Time
Elapsed Time
PDF created with pdfFactory Pro trial version www.pdffactory.com



推荐阅读
  • 本文详细介绍了Akka中的BackoffSupervisor机制,探讨其在处理持久化失败和Actor重启时的应用。通过具体示例,展示了如何配置和使用BackoffSupervisor以实现更细粒度的异常处理。 ... [详细]
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • 本文详细介绍了Java中org.neo4j.helpers.collection.Iterators.single()方法的功能、使用场景及代码示例,帮助开发者更好地理解和应用该方法。 ... [详细]
  • 深入理解 SQL 视图、存储过程与事务
    本文详细介绍了SQL中的视图、存储过程和事务的概念及应用。视图为用户提供了一种灵活的数据查询方式,存储过程则封装了复杂的SQL逻辑,而事务确保了数据库操作的完整性和一致性。 ... [详细]
  • 本文详细介绍了如何使用 Yii2 的 GridView 组件在列表页面实现数据的直接编辑功能。通过具体的代码示例和步骤,帮助开发者快速掌握这一实用技巧。 ... [详细]
  • 本文深入探讨了 Java 中的 Serializable 接口,解释了其实现机制、用途及注意事项,帮助开发者更好地理解和使用序列化功能。 ... [详细]
  • Android 渐变圆环加载控件实现
    本文介绍了如何在 Android 中创建一个自定义的渐变圆环加载控件,该控件已在多个知名应用中使用。我们将详细探讨其工作原理和实现方法。 ... [详细]
  • 本文详细介绍了如何在Linux系统上安装和配置Smokeping,以实现对网络链路质量的实时监控。通过详细的步骤和必要的依赖包安装,确保用户能够顺利完成部署并优化其网络性能监控。 ... [详细]
  • 1.如何在运行状态查看源代码?查看函数的源代码,我们通常会使用IDE来完成。比如在PyCharm中,你可以Ctrl+鼠标点击进入函数的源代码。那如果没有IDE呢?当我们想使用一个函 ... [详细]
  • 本文详细介绍了 Dockerfile 的编写方法及其在网络配置中的应用,涵盖基础指令、镜像构建与发布流程,并深入探讨了 Docker 的默认网络、容器互联及自定义网络的实现。 ... [详细]
  • IneedtofocusTextCellsonebyoneviaabuttonclick.ItriedlistView.ScrollTo.我需要通过点击按钮逐个关注Tex ... [详细]
  • c# – UWP:BrightnessOverride StartOverride逻辑 ... [详细]
  • 本文深入探讨 MyBatis 中动态 SQL 的使用方法,包括 if/where、trim 自定义字符串截取规则、choose 分支选择、封装查询和修改条件的 where/set 标签、批量处理的 foreach 标签以及内置参数和 bind 的用法。 ... [详细]
  • 本文详细介绍了Java中org.eclipse.ui.forms.widgets.ExpandableComposite类的addExpansionListener()方法,并提供了多个实际代码示例,帮助开发者更好地理解和使用该方法。这些示例来源于多个知名开源项目,具有很高的参考价值。 ... [详细]
  • DNN Community 和 Professional 版本的主要差异
    本文详细解析了 DotNetNuke (DNN) 的两种主要版本:Community 和 Professional。通过对比两者的功能和附加组件,帮助用户选择最适合其需求的版本。 ... [详细]
author-avatar
几米身边的孩子们
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有