Tuning 01 Overview of Oracle Performance Tuning

永无止境的调优

image

service level agreements: 是一个量化的调优的指标.

performance 只要满足业务OK就可以了, 没必要调的很多, 因为有得必有失, 一方面调的特别优化, 可能导致另一方面出问题

主要还是关注SQL调优把(Troubleshooting Oracle performance 这本书主要是针对SQL的调优)

image

调优是告诉你怎么样使用ORACLE

没有1本书能大而全的论述性能调优

image

database administrators 和 system administrators 都需要调优

image

第1部分: 开发人员, 测试人员和DBA一起调优(这部分内容比较重要, 主要针对SQL调优)

第2部分: DBA 调优

第3部分: DBA 和 系统管理员一起调优

调优的目标

  响应时间要短 等等

  要实现目标就要尽可能的让ORACLE少访问磁盘

image

SQL tunning 还有 troubleshooting and tuning 比较重要

Troubleshooting and Tuning: This is the methodology recommended for production databases. It consists of looking for bottlenecks, and resolving them. Use tools to identify performance problems. By examining this data form a hypothesis of what is causing the bottleneck. From the hypothesis develop a solution, and implement it. Run a test load against the database to determin if the performance problem has been resolved.

image

image

1. 每次访问数据库都建立一个连接(例如)

2. 每次进行查询时都建立一个游标(例如)

3. 表结构定义的有问题( 大量的 join 性能就会下降 )

image

调优的阶段, 就类似看病, 如果是早期发现, 早期治疗比较好

image

系统没有出现问题时,定义一套baseline基线,当系统出现问题时,看看比较一下系统基线情况

image

1. 首先找到问题

2. 搜集操作系统和oracle statistics 内容

3. 首先考虑一般的性能问题(日常工作经验积累)

4. 建立一个猜想, 大概是哪除了问题

5. 根据猜想, 去调优

6. 看看是不是解决了问题.

image

调优经验(Tuning Methodology 上 下一起)

image

image

平衡 performance 和 security

p: performance

s: security

调优生产库的步骤

  • Locate the bottleneck by using tools. such as STATSPACK, UTLBSTAT and UTLESTAT or Oracle Enterprise Manager.
  • Determine the reason for the bottleneck.
  • Resolve the cause. 比如修改SGA参数啊, 等等.
  • Check that the bottleneck has been rosolved.
原文地址:https://www.cnblogs.com/moveofgod/p/3227166.html