toring is usually part of a largercapacity planning exercise, where resource consumption is examined to seechanges in the way the application is being used, and the way the applicationis using the database and host resources.
通常,监控并不改变系统的配置,除非他暴露出了正在发生的一些严重的问题。在一些情况下,有经验的性能工程师能够只通过统计信息解决潜在的问题,尽管伴随着性能的下降。当没有显著的性能下降时,主动调整和试验系统是危险的,会造成系统不必要的性能下降。调整系统需要考虑反应调谐,而且反应调优的步骤要被跟踪。
监测通常是更大规模的规划工作中的一部分,那部分里面,资源消耗被检测来观测应用被使用的方式和 数据库及 主机资源的改变。
1.1.2.4.2瓶颈消除
Tuning usually implies fixing a performanceproblem. However, tuning should be part of the life cycle of an application—through the analysis, design, coding,production, and maintenance stages. Oftentimes, the tuning phase is left untilthe system is in production. At this time, tuning becomes a reactivefire-fighting exercise, where the most important bottleneck is identified andfixed.
Usually, the purpose for tuning is to reduceresource consumption or to reduce the elapsed time for an operation tocomplete. Either way, the goal is to improve the effective use of a particularresource. In general, performance problems are caused by the over-use of aparticular resource. That resource is the bottleneck in the system. There are anumber of distinct phases in identifying the bottleneck and the potentialfixes. These are discussed in the sections that follow.
调优通常意味着修复性能问题。然而调优应该是应用程序整个生命周期的一部分,包括分析,设计,编码,生产,维护阶段。经常的情况是调优阶段会一直保留到到系统生产运行才离开。那个时候调优已经变成响应的工作,大多数重要的瓶颈已经被识别和修复。
通常情况下,调优的目的是为了减少资源消耗或者减少某项操作完成的耗时。无论哪种方式,目的都是为了提高某个特殊资源的有效利用。一般来说,性能问题都是由某个特殊资源过度使用造成的,那个资源正好是系统的瓶颈。辨识出瓶颈和潜在的问题有许多不同的阶段。这些东西将在以下部分被讨论:
Remember that the different forms ofcontention are symptoms that can be fixed by making changes in the followingplaces:
请记住竞争的不同形式是一些症状,这些症状能够被在以下地方做些改变来修复、
Changes in the application, or the way the application is used
应用程序的改变,或者应用程序被使用方式的改变
Changes in Oracle
oracle的改变
Changes in the host hardware configuration
主机硬件配置的改变。
Often, the most effective way of resolving abottleneck is to change the application.
经常情况下,解决瓶颈最有效地方式是改变一个应用程序。
1.1.3 SQL 优化
Part IV, "Optimizing SQL Statements" ofthis guide discusses the process of tuning and optimizing SQL statements.
本节的IV部分 讨论到了调优的过程 和sql的优化。
Many client/server application programmersconsider SQL a messaging language, because queries are issued and data isreturned. However, client tools often generate inefficient SQL statements.Therefore, a good understanding of the database SQL processing engine isnecessary for writing optimal SQL. This is especially true for high transactionprocessing systems.
许多客户端和服务端的应用程序开发者把sql当做是一种消息语言,因为查询发起后就会返回结果数据。然而客户端工具常常会产出一些低效率的sql。因此,对数据库sql处理工作机制有个很好的理解对写出最优的sql是必要的。这对高事物处理系统尤其管用。
Typically, SQL statements issued by OLTPapplications operate on relatively few rows at a time. If an index can point tothe exact rows that are required, then Oracle can construct an accurate plan toaccess those rows efficiently through the shortest possible path. In decisionsupport system (DSS) environments, selectivity is less important, because theyoften access most of a table's rows. In such situations, full table scans arecommon, and indexes are not even used. This book is primarily focussed onOLTP-type applications. For detailed information on DSS and mixed environments,see the Oracle Database Data Warehousing Guide.
通常情况下,由联机事务处理系统发起的sql语句在同一时间会操作相对少的行。如果一个索引能够定位它所需要的准确行,那么oracle能够通过可能的最短的路径来建立一个准确的计划来取到那些行。在决策支撑系统环