源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

MySQL数据库维护中监控所用到的常用命令

  • 时间:2022-04-02 16:41 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:MySQL数据库维护中监控所用到的常用命令
status = show status like ‘%%' [例:show status like 'Com_select'] variables = show variables like ‘%%' [例:show variables like 'query_cache_size'] [b]1、MySQL查询次数(status) [/b]Com_select;Com_update;Com_insert;Com_delete;Com_change_db [b]2、查询缓存空间大小:query_cache_size(variables) [/b]查询缓存最大查询数据集大小:query_cache_limit(variables); 缓存中的查询个数:Qcache_inserts(status); 查询缓存命中率:(Qcache_hits/(Qcache_hits+Qcache_inserts))*100% (status) [b]3、索引缓存命中率 [/b]索引缓存空间大小:key_buffer_size (variables) 索引缓存命中率:(Key_reads/Key_read_requests)*100% (status) [b]4、并发连接数 [/b]最大充许连接数:max_connections(variables) 实际最大连接数:max_used_connections(status) 当前连接数:Threads_connected(status) 活跃连接数:Threads_running(status) 缓存连接数:Threads_cache(status) [b]5、流量统计(status) [/b]Bytes_received ,Bytes_sent(status) [b]6、连接次数 [/b]每秒连接次数:Connections(status) 每秒实际创建连接次数:Threads_created(status) [b]7、表锁定统计 [/b]立即释放的表锁数:Table_locks_immediate(status) 需要等待的表锁数:Table_locks_waited(status)
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部