当前位置:网站首页>数据库性能分析与优化(爱测未来团队内训材料)
数据库性能分析与优化(爱测未来团队内训材料)
2022-07-28 16:29:00 【itest_2016】








内存管理方式:MSMM、ASMM(sga_target)、AMM(memory_target) 小内存有小内存的问题,大内存有大内存的麻烦!ORA-04031 Buffer cache 和 sharedpool size 的 begin/end值在 ASMM、AMM 和 11gR2MSMM 下可是会动

Parses 解析次数,包括软解析+硬解析,我们希望的是 解析一次 到处运行!HardParses 万恶之源.Cursorpin s on X, librarycache: mutex X , latch: row cache objects /sharedpool……………..。硬解析最好少于每秒 20 次


log file sync:一般此类等待时间是由于 LGWR 进程讲 redo log buffer 写入 redo log 中发生。
commit次数是否过多


有的组件对响应时间要求比较高,测试过程中我们应将慢查询阈值,设置尽量小。
有的SQL可能是做一些统计用的,没有实时性的要求,这时在测试时,慢查询阈值可以设置高一点。




Statspack-生成快照




建议:计算一下使用率:10% < 连接数使用率 < 85% .




10046 trace来跟踪Oracle













1、索引是用来提高查询SQL性能的,但有些情况下的查询是无法使用索引的,建了也没用
2、接下来我们看下我们常用的查询类型有哪些。
3、不同类型的查询,建立索引时我们需要注意些什么


1、不同的存储引擎支持的索引方法不同
2、这里以InnoDB引擎,支持的Btree索引为例说明


这里不我们不光查询条件firstname要加索引,排序的字段也需要加入索引

1、对查询结果使用group by进行分组时,需要加索引。
2、使用distinct进行唯一性查询时,firstname字段虽然不是作为查询条件,需要加入索引。


左连接:以左表为基准(左表取的是全部数据),到右表按条件匹配数据。搜索条件都在右表启作用,所以索引建立在右表。

(喜欢请转发,谢谢!)
加入爱测未来qq群,获取更专业的技术知识分享:
274166295 (爱测未来二群)
610934609 (爱测未来三群)
195730410 (爱测未来四群)
更多精彩文章:
——————————————————
爱测未来公众号
WX:itest_forever

测试之道 | 测试技术
长按识别二维码,关注爱测未来公众号,了解更多精彩内容
边栏推荐
猜你喜欢

Awk of shell script

Asynchronous circuit design -- principle and example of synchronous pulser
![[kibana] problem sorting kibana 7.x no indices match pattern](/img/36/0f85dbe7eea49db8f845a4a4f302cf.png)
[kibana] problem sorting kibana 7.x no indices match pattern "APM-*“

Visual studio 2012/2015 releases web applications together with.Cs source code

Gray code and binary conversion and typical examples (4bits gray code counter)

The practice of beego framework developed by goweb: Section 4 database configuration and connection

SNAT、DNAT 防火墙规则的备份和还原

Valarray Library Learning

产品研发中第三方技术服务的管理
![[Presto] details of the new version upgrade of Presto](/img/12/61ed53ff7a8a810092d60501cca443.png)
[Presto] details of the new version upgrade of Presto
随机推荐
Verilog daily question (VL2 asynchronous reset Series T trigger - Niuke network)
Export word according to the template, generate compound format tables and variable column tables
面试官:算法刷题实录.pdf我居然答不上来
Selection and application of inductors in high speed circuits
Shell脚本之AWK
[CDH] configure CDH components through clouderamanager and collect JMX information with Prometheus monitoring
Vscode uses eslint prettier to format code automatically
Wechat applet cash red packet returns the error "the IP address is not the available IP address you set on the merchant platform". The ultimate solution
@RequestParam使用
【CDH】通过 ClouderaManager 配置CDH组件用 prometheus 监控采集JMX信息
MySQL implements sorting according to custom (specified order)
AMQP protocol details
JS中为对象数组添加新对象结果导致数组中已存在的对象也修改了
MySQL数据库增删改查(基础操作命令详解)
Verilog daily question (vl4 shift operation and multiplication)
【presto 】presto 新版本升级详情
从非儿童网站看基线安全到底有多重要
No interactive operation of shell script
[kibana] problem sorting kibana 7.x no indices match pattern "APM-*“
Vscode plug-in automatically adds comments