当前位置:网站首页>mysql性能监控和sql语句
mysql性能监控和sql语句
2022-06-26 09:51:00 【波哥】
1、查询缓存:
mysql> show variables like '%query_cache%';2、缓存在Cache中线程数量thread_cache_size:
mysql> show variables like 'thread%';3、DB已连接的线程数:
mysql> show status like 'connections';4、当前连接线程状态:
mysql> show status like '%thread%';5、索引缓存大小:
mysql> show variables like 'key_buffer_size';6、索引缓存未命中率:
mysql> show global status like 'key_read%';7、索引缓存命中率:
mysql> show global status like 'key_%';8、索引读取统计:
mysql> show global status like 'key_blocks_u';key_blocks_unused表示未使用的缓存簇(blocks)数,key_blocks_used表示曾经用到的最大的blocks,如果缓存都用到了,要么增加key_buffer_size,要么过度索引,把缓存占满了。
9、并发最大连接数-允许最大连接数(一般500到800比较合适):
mysql> show variables like 'max_connections';10、并发最大连接数-服务器响应最大连接数:
mysql> show global status like 'max_used_connections';11、并发最大连接数-当前连接数:
mysql> show global status like 'connections';12、并发最大连接数-线程队列(值越小越好):
mysql> show variables like 'back_log';13、临时表:
mysql> show global status like 'created_tmp%';临时表比较大无法在内存完成时就不得使用磁盘文件,如果'created_tmp_tables非常大,则可能是系统中的排序操作过多,或者是表连接方式优化不够。
14、mysql服务器对临时表的配置:
mysql> show variables where variable_name in ('temp_able_siae','max_heap_table_size');当临时表空间小于max_heap_table_size时,才能全部放入内存。
15、表扫描情况:
mysql> show global status like 'handler_read%';
mysql> show global status like 'com_select';如果表扫描率超过4000,说明进行太多表扫描,可能索引没有建好,增加read_buffer_size值会有好处,但不要查8M。
边栏推荐
- [software project management] sorting out knowledge points for final review
- Call API interface to generate QR code of wechat applet with different colors
- CentOS installs redis multi master multi slave cluster
- 看我在Map<String, String>集合中,存入Integer类型数据
- Using foreach to loop two-dimensional array
- MySQL第八次作业
- Blog article index Summary - wechat games
- [difficult and miscellaneous diseases] @transitional failure summary
- Swiftui development experience: data layer of application design for offline priority
- 量化投资学习——经典书籍介绍
猜你喜欢

Under the double reduction, the amount of online education has plummeted. Share 12 interesting uses of webrtc

MySQL第十次作业-视图

Write data to local file

Which PHP open source works deserve attention

Jasperreports - print PDF (project tool)

DataBinding使用与原理分析

Flutter与原生通信(上)

MySQL第七次作业-更新数据

栖霞市住建局和消防救援大队开展消防安全培训

AdaptiveAvgPool2D 不支持 onnx 导出,自定义一个类代替 AdaptiveAvgPool2D
随机推荐
Global and Chinese market of cryogenic bulk tanks 2022-2028: Research Report on technology, participants, trends, market size and share
Jasperreports - print PDF (project tool)
Dynamic library connection - symbol conflict - global symbol intervention
Vscode environment setup: synchronous configuration
Moore vote, leetcode169, leetcode229
Quantitative investment learning - Introduction to classic books
Global and Chinese markets of children's electronic thermometers 2022-2028: Research Report on technology, participants, trends, market size and share
String class intern() method and string constant pool
利用foreach循环二维数组
Flutter and native communication (Part 1)
Oracle sqlplus query result display optimization
RDB persistence validation test
Blog article index Summary - wechat games
Establishment of smart dialogue platform for wechat official account
Little red book - Notes inspiration - project summary
Windows and Linux regularly backup MySQL database
Which PHP open source works deserve attention
The sixth MySQL job - query data - multiple conditions
Problems encountered in the application and development of Hongmeng and some roast
Concise course of probability theory and statistics in engineering mathematics second edition review outline