bottleneck(瓶颈):  a point where resource contention is highest

throughput(吞吐量): the amount of work that can be completed in a specified time.

response time (响应时间): the time to complete a specified workload

2.1 Gathering Database Statistics Using the Automatic Workload Repository(AWR)

Automatic Workload Repository (AWR) automates database statistics gathering by collecting, processing, and maintaining performance statistics for database problem detection and self-tuning purposes.

the database gathers statistics every hour and creates an AWR snapshot, which is a set of data for a specific time that is used for performance comparisons.

The following initialization parameters are relevant for AWR:

  • STATISTICS_LEVEL
  • CONTROL_MANAGEMENT_PACK_ACCESS

The database statistics collected and processed by AWR include:

2.1.1 Time Model Statistics

Time model statistics measure the time spent in the database by operation type. The most important time model statistic is database time (DB time). DB time represents the total time spent in database calls by foreground sessions, and is an indicator of the total instance workload.

A session is a logical entity in the database instance memory that represents the state of a current user login to a database.Database time is calculated by aggregating the CPU time and wait time of all active sessions (sessions that are not idle).

The objective of database tuning is to reduce DB time. In this way, you can improve the overall response time of user transactions in the application.

2.1.2 Wait Event Statistics

Wait events are incremented by a session to indicate that the session had to wait for an event to complete before being able to continue processing. When a session has to wait while processing a user request, the database records the wait by using one of a set of predefined wait events. The events are then grouped into wait classes, such as User I/O and Network. Wait event data reveals symptoms of problems that might be affecting performance, such as latch, buffer, or I/O contention.

2.1.3 Session and System Statistics

A large number of cumulative database statistics are available on a system and session level. Some of these statistics are collected by AWR.

2.1.4 Active Session History Statistics

The Active Session History (ASH) statistics are samples of session activity in the database. The database samples active sessions every second and stores them in a circular buffer in the System Global Area (SGA).

2.1.5 High-Load SQL Statistics

SQL statements that are consuming the most resources produce the highest load on the system, based on criteria such as elapsed time and CPU time.

2.2 Using the Oracle Performance Method

Performance tuning using the Oracle performance method is driven by identifying and eliminating bottlenecks in the database, and by developing efficient SQL statements. Database tuning is performed in two phases: proactively and reactively.

In the proactive tuning phase, you must perform tuning tasks as part of your daily database maintenance routine, such as reviewing ADDM analysis and findings, monitoring the real-time performance of the database, and responding to alerts.

In the reactive tuning phase, you must respond to issues reported by users, such as performance problems that may occur for only a short duration of time, or performance degradation to the database over a period of time.

SQL tuning is an iterative process to identify, tune, and improve the efficiency of high-load SQL statements.

To improve database performance, you must apply these principles iteratively.

2.2.1 Preparing the Database for Tuning

To prepare the database for tuning:

  1. Get feedback from users.

Determine the scope of the performance project and subsequent performance goals, and determine performance goals for the future. This process is key for future capacity planning.

2. Check the operating systems of all systems involved with user performance.

Check for hardware or operating system resources that are fully utilized. List any overused resources for possible later analysis. In addition, ensure that all hardware is functioning properly.

 3.Ensure that the STATISTICS_LEVEL initialization parameter is set to TYPICAL (default) or ALL to enable the automatic performance tuning features of Oracle Database, including AWR and ADDM.

4.Ensure that the CONTROL_MANAGEMENT_PACK_ACCESS initialization parameter is set to DIAGNOSTIC+TUNING (default) or DIAGNOSTIC to enable ADDM.

2.2.2 Tuning the Database Proactively

To tune the database proactively:

  1. Review the ADDM findings
  2. Implement the ADDM recommendations
  3. Monitor performance problems with the database in real time
  4. Respond to performance-related alerts
  5. Validate that any changes have produced the desired effect, and verify that the users experience performance improvements.

2.2.3 Tuning the Database Reactively

This section lists and describes the steps required to tune the database based on user feedback. This tuning procedure is considered reactive. Perform this procedure periodically when performance problems are reported by the users.

To tune the database reactively:

  1. Run ADDM manually to diagnose current and historical database performance when performance problems are reported by the users
  2. Resolve transient performance problems.(ASH reports enable you to analyze trainsient performance problems with the database that are short-lived and do not appear in the ADDM analysis)
  3. Resolve performance degradation over time
  4. Validate that the changes made have produced the desired effect, and verify that the users experience performance improvements.

  5. Repeat these steps until your performance goals are met or become impossible to achieve due to other constraints.

2.2.4 Tuning SQL Statements

This section lists and describes the steps required to identify, tune, and optimize high-load SQL statements.

To tune SQL statements:

  1. Identify high-load SQL statements
  2. Tune high-load SQL statements
  3. Optimize data access paths(creating the proper set of materialized views, materialized view logs, and indexes for a given workload by using SQL Access Advisor)
  4. Analyze the SQL performance impact of SQL tuning and other system changes by using SQL Performance Analyzer.
  5. Repeat these steps until all high-load SQL statements are tuned for greatest efficiency.

2.3 Common Performance Problems Found in Databases

consult the appropriate section that addresses these problems:

  • CPU bottlenecks

Performance problems caused by CPU bottlenecks are diagnosed by ADDM,you can also identify CPU bottlenecks by using the Performance page in Cloud Control

  • Undersized memory structures

Are the Oracle memory structures such as the System Global Area (SGA), Program Global Area (PGA), and buffer cache adequately sized? Performance problems caused by undersized memory structures are diagnosed by ADDM.You can also identify memory usage issues by using the Performance page in Cloud Control

  • I/O capacity issues

Is the I/O subsystem performing as expected? Performance problems caused by I/O capacity issues are diagnosed by ADDM.You can also identify disk I/O issues by using the Performance page in Cloud Control

  • Suboptimal use of Oracle Database by the application

Problems such as establishing new database connections repeatedly, excessive SQL parsing, and high levels of contention for a small amount of data (also known as application-level block contention) can degrade the application performance significantly. Performance problems caused by suboptimal use of Oracle Database by the application are diagnosed by ADDM.You can also monitor top activity in various dimensions—including SQL, session, services, modules, and actions—by using the Performance page in Cloud Control.

  • Concurrency issues

A high degree of concurrent activities might result in contention for shared resources that can manifest in the form of locks or waits for buffer cache. Performance problems caused by concurrency issues are diagnosed by ADDM.You can also identify concurrency issues by using Top Sessions in Cloud Control

  • Database configuration issues

For example, is there evidence of incorrect sizing of log files, archiving issues, too many checkpoints, or suboptimal parameter settings? Performance problems caused by database configuration issues are diagnosed by ADDM.

  • Short-lived performance problems

Depending on the interval between snapshots taken by AWR, performance problems that have a short duration may not be captured by ADDM. You can identify short-lived performance problems by using the Active Session History report.

  • Degradation of database performance over time

You can generate an AWR Compare Periods report to compare the period when the performance was poor to a period when the performance is stable to identify configuration settings, workload profile, and statistics that are different between these two time periods. This technique helps you identify the cause of the performance degradation

  • Inefficient or high-load SQL statements

Performance problems caused by high-load SQL statements are diagnosed by ADDM.You can also identify high-load SQL statements by using Top SQL in Cloud Control.You can tune the high-load SQL statements using SQL Tuning Advisor

  • Object contention

Are any database objects the source of bottlenecks because they are continuously accessed?Performance problems caused by object contention are diagnosed by ADDM.You can also optimize the data access path to these objects using SQL Access Advisor.

  • Unexpected performance regression after tuning SQL statements

Tuning SQL statements may cause changes to their execution plans, resulting in a significant impact on SQL performance. In some cases, the changes may result in the improvement of SQL performance. In other cases, the changes may cause SQL statements to regress, resulting in a degradation of SQL performance.

Before making changes on a production system, you can analyze the impact of SQL tuning on a test system by using SQL Performance Analyzer. This feature enables you to forecast the impact of system changes on a SQL workload by:

  • Measuring the performance before and after the change

  • Generating a report that describes the change in performance

  • Identifying the SQL statements that regressed or improved

  • Providing tuning recommendations for each SQL statement that regressed

  • Enabling you to implement the tuning recommendations when appropriate

About Oracle Database Performance Method相关推荐

  1. Oracle® Database Performance Tuning Guide 11g Release 2 (11.2)----Configuring and Using Memory

    It's Oracle official document about oracle memory  : http://docs.oracle.com/cd/E11882_01/server.112/ ...

  2. 专家视角 | 小荷的 Oracle Database 18c 新特性快速一瞥

    作者介绍:何剑敏  大疆创新 互联网事业部 运维部数据库技术团队负责人,曾供职于中国联通,卓望数码,IBM 和 ORACLE ACS 华南团队.多年从事一线的数据库运维工作,有丰富项目经验.维护经验和 ...

  3. Oracle Database In-Memory Advisor

    概述 本文是此白皮书的阅读笔记. Database In-Memory 以下简称 DBIM. DBIM Advisor以下简称建议器. DBIM是12.1.0.2时发布的,也就是说在12c刚发布时并无 ...

  4. Oracle Database 12c Security - 11. Oracle Transparent Data Encryption

    Transparent Data Encryption以下简称TDE. 称为透明是因为加密工作在SQL层以下,由数据库引擎自动进行. TDE是第三代加密,10gR2时引入.之前两代为DBMS_OBFU ...

  5. 【OH】Deprecated and Desupported Features for Oracle Database 12c

    连接地址:http://docs.oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60000 8Deprecated and Desupported ...

  6. (Alex note) Create a oracle database

    A.List the prerequistites necessarey for database creation1)确定数据库类型(OLTP or OLAP) 2)规划数据库架构, 如datafi ...

  7. oracle rac服务供应商,【Oracle Database】Oracle RAC(八):服务资源管理

    [Oracle Database]Oracle RAC(八):服务资源管理 发布时间:2020-07-24 15:02:47 来源:51CTO 阅读:210 作者:NOGYMS Service资源 每 ...

  8. Oracle Database 10g安装后的基本环境与服务

    Oracle Database 10g安装后的基本环境与服务 Oracle安装后的基本环境主要涉及安装后的程序组.DBMS包含的物理文件.与数据库服务器相关的服务.Oracle默认的帐户/口令以及在M ...

  9. oracle10.21数据库安装,安装并创建数据库【Oracle Database 10g】(三)

    10.安装并创建数据库 在root用户下,先将光盘中的oracle数据库软件拷到根目录下,然后再执行:unzip 10201_database_linux32.zip mv database/* /h ...

最新文章

  1. 在结构化场景中基于单目的物体与平面SLAM方案
  2. 简单介绍 ghost封装过程
  3. windows程序消息机制(Winform界面更新有关)--转
  4. 关于$_SERVER['PHP_AUTH_USER']
  5. BugKuCTF 杂项 隐写2
  6. 探讨一下常见支付系统的对外接口
  7. Salesforce 为什么要收购 Slack?
  8. 测试用例设计之正交表设计
  9. TMEA:源于音乐,高于盛典
  10. 检察院计算机知识试卷,2014河南检察院考试备考:计算机专业课试题练习
  11. mysql时间相减得到天数保留两位_mysql两个日期计算天数
  12. Android Camera2 之 CameraCharacteristics 详解
  13. 怎么用计算机打印出东西,怎样在电脑上打印东西_怎么用电脑打印东西
  14. 精进1-职业价值 by采铜
  15. 快手与欧足联达成版权合作,获本赛季欧冠直播和短视频二创授权
  16. android获取整体存储空间大小,Android 获取剩余存储空间
  17. Android上的RNDIS
  18. JAVA day02代码(条件控制语句部分)
  19. 我的JS OO如是观
  20. 我是这样教《雨巷》的

热门文章

  1. 【PTA-python】第7章-1 词频统计 (30 分)--sys.stdin.read()读入到特定字符截至,双重排序条件key=lambda item:(-item[1], item[0])
  2. 转行Python容易吗?
  3. HR-Saas(二):登录模块
  4. 好用的工作邮箱有哪些?工作邮箱如何登录
  5. 科技学术论文润色经验——分享1
  6. T 基础 高数 上:函数
  7. 水晶报表设置纸张大小
  8. 偶然看到的一篇文章中的励志诗
  9. Monkey详解(脚本篇---获取坐标)
  10. [大忌(。_。)]清明节外出