热门标签 | 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



推荐阅读
  • 从 .NET 转 Java 的自学之路:IO 流基础篇
    本文详细介绍了 Java 中的 IO 流,包括字节流和字符流的基本概念及其操作方式。探讨了如何处理不同类型的文件数据,并结合编码机制确保字符数据的正确读写。同时,文中还涵盖了装饰设计模式的应用,以及多种常见的 IO 操作实例。 ... [详细]
  • 2023年京东Android面试真题解析与经验分享
    本文由一位拥有6年Android开发经验的工程师撰写,详细解析了京东面试中常见的技术问题。涵盖引用传递、Handler机制、ListView优化、多线程控制及ANR处理等核心知识点。 ... [详细]
  • 本教程涵盖OpenGL基础操作及直线光栅化技术,包括点的绘制、简单图形绘制、直线绘制以及DDA和中点画线算法。通过逐步实践,帮助读者掌握OpenGL的基本使用方法。 ... [详细]
  • Startup 类配置服务和应用的请求管道。Startup类ASP.NETCore应用使用 Startup 类,按照约定命名为 Startup。 Startup 类:可选择性地包括 ... [详细]
  • 使用Pandas高效读取SQL脚本中的数据
    本文详细介绍了如何利用Pandas直接读取和解析SQL脚本,提供了一种高效的数据处理方法。该方法适用于各种数据库导出的SQL脚本,并且能够显著提升数据导入的速度和效率。 ... [详细]
  • UNP 第9章:主机名与地址转换
    本章探讨了用于在主机名和数值地址之间进行转换的函数,如gethostbyname和gethostbyaddr。此外,还介绍了getservbyname和getservbyport函数,用于在服务器名和端口号之间进行转换。 ... [详细]
  • 本文详细介绍了如何构建一个高效的UI管理系统,集中处理UI页面的打开、关闭、层级管理和页面跳转等问题。通过UIManager统一管理外部切换逻辑,实现功能逻辑分散化和代码复用,支持多人协作开发。 ... [详细]
  • 作为一名新手,您可能会在初次尝试使用Eclipse进行Struts开发时遇到一些挑战。本文将为您提供详细的指导和解决方案,帮助您克服常见的配置和操作难题。 ... [详细]
  • 在使用 DataGridView 时,如果在当前单元格中输入内容但光标未移开,点击保存按钮后,输入的内容可能无法保存。只有当光标离开单元格后,才能成功保存数据。本文将探讨如何通过调用 DataGridView 的内置方法解决此问题。 ... [详细]
  • 利用存储过程构建年度日历表的详细指南
    本文将介绍如何使用SQL存储过程创建一个完整的年度日历表。通过实例演示,帮助读者掌握存储过程的应用技巧,并提供详细的代码解析和执行步骤。 ... [详细]
  • ###问题删除目录时遇到错误提示:rm:cannotremoveusrlocaltmp’:Directorynotempty即使用rm-rf,还是会出现 ... [详细]
  • 本文详细介绍了Java中的输入输出(IO)流,包括其基本概念、分类及应用。IO流是用于在程序和外部资源之间传输数据的一套API。根据数据流动的方向,可以分为输入流(从外部流向程序)和输出流(从程序流向外部)。此外,还涵盖了字节流和字符流的区别及其具体实现。 ... [详细]
  • 不确定性|放入_华为机试题 HJ9提取不重复的整数
    不确定性|放入_华为机试题 HJ9提取不重复的整数 ... [详细]
  • 本文探讨了在C++中如何有效地清空输入缓冲区,确保程序只处理最近的输入并丢弃多余的输入。我们将介绍一种不阻塞的方法,并提供一个具体的实现方案。 ... [详细]
  • MySQL PMM:MyISAM 和 Aria 存储引擎的性能优化
    本文探讨了 MyISAM 和 Aria 存储引擎在 MySQL 中的关键性能指标,包括密钥缓冲区效率、页面缓存读写性能以及事务日志同步策略。通过优化这些参数,可以显著提升数据库的整体性能。 ... [详细]
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社区 版权所有