当前位置:网站首页>数据库性能分析与优化(爱测未来团队内训材料)
数据库性能分析与优化(爱测未来团队内训材料)
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

测试之道 | 测试技术
长按识别二维码,关注爱测未来公众号,了解更多精彩内容
边栏推荐
- Easy to use vscode plug-in memo
- MySQL implements sorting according to custom (specified order)
- influxdb2的使用
- [ansible] the ansible shell encountered the problem of $symbol in awk when executing remote commands
- C language to achieve minesweeping games
- FreeRTOS learning notes
- Encountered.Sqlite file processing during Android Development
- 产品研发中第三方技术服务的管理
- 漫谈测试平台—建设模式探讨
- 部署LAMP平台---Linux,Apache,MySQL,PHP的编译安装
猜你喜欢

Master the key points of JVM interview

Selection and application of capacitor in high speed circuit -- detailed explanation

Sed of shell programming

Selection of resistance in high speed circuit

Valarray Library Learning

MySQL的触发器

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

The actual combat of the beego framework of goweb development: Section III program execution process analysis

Verilog daily question (vl28 plus and minus counter)

高速电路中电感的选型和应用
随机推荐
【ansible】ansible shell 执行远程命令遇到awk 中$符号的问题
C#遍历集合
高速电路中电感的选型和应用
The practice of beego framework developed by goweb: Section 4 database configuration and connection
Proof of the third scene (f) in 22 years
The practice of beego framework developed by goweb: Section 4 database configuration and connection
掌握JVM面试专题和答案Offer拿到手软(附学习路线图)
Linear algebra and matrix theory (10)
【kibana】问题整理 kibana 7.x No indices match pattern “apm-*“
异步FIFO基本原理(基于Verilog的简单实现)
Master the key points of JVM interview
产品研发中第三方技术服务的管理
About standard IO buffers
Blue Bridge Cup embedded competition resources and skills
C语言实现扫雷小游戏
Asynchronous circuit design -- principle and example of synchronous pulser
特殊质数js实现
关于标准IO缓冲区的问题
LNMP源码编译安装
MySQL PgSQL realizes the merging of multiple lines of records into one line, grouping and merging, and dividing with specified characters