当前位置:网站首页>mysql性能監控和sql語句
mysql性能監控和sql語句
2022-06-26 10:48: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。
边栏推荐
- RDB持久化验证测试
- Express (I) - easy to get started
- Which PHP open source works deserve attention
- [work details] March 18, 2020
- SSH, SCP command appears permission denied, please try again solution
- Using foreach to loop two-dimensional array
- 35 qlineedit control synthesis example
- MySQL project 7 Summary
- 栖霞市住建局和消防救援大队开展消防安全培训
- Flutter and native communication (Part 1)
猜你喜欢

Développeur, quelle est l'architecture des microservices?

Which PHP open source works deserve attention

Opencv image processing - grayscale processing

36 qtextedit control input multiline text

MySQL 8th job

DBSCAN

開發者,微服務架構到底是什麼?

MySQL第十一作業-視圖的應用

看我在Map<String, String>集合中,存入Integer类型数据

Developers, what is the microservice architecture?
随机推荐
Swiftui development experience: data layer of application design for offline priority
MySQL 8th job
Servlet learning notes II
MySQL 11th job - view application
36 qtextedit control input multiline text
Flutter与原生通信(上)
Installing MySQL under Linux [details]
Progressive Web 应用程序PWA是应用程序开发的未来
How QT uses quazip to compress and decompress files
Procedure Call Standard
MySQL seventh job - update data
工作汇报(2)
Global and Chinese market of amateur football helmets 2022-2028: Research Report on technology, participants, trends, market size and share
Expand and collapse too high div
指南针软件买股票进行交易安全吗?怎么开户买股票
mysql性能监控和sql语句
AdaptiveAvgPool2D 不支持 onnx 导出,自定义一个类代替 AdaptiveAvgPool2D
Which PHP open source works deserve attention
MySQL Chapter 4 Summary
Moore vote, leetcode169, leetcode229