位置: 编程技术 - 正文

mysql性能优化工具--tuner-primer使用介绍(mysql语句性能优化)

编辑:rootadmin

推荐整理分享mysql性能优化工具--tuner-primer使用介绍(mysql语句性能优化),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:mysql5.7性能优化,mysql性能优化和高可用性实践,mysql性能优化和高可用性实践,mysql性能优化工具,mysql8性能优化,mysql性能优化和高可用架构实践 pdf,mysql性能优化和高可用架构实践 pdf,mysql5.7性能优化,内容如对您有帮助,希望把文章链接给更多的朋友!

mysql性能优化工具--tuner-primer使用介绍(mysql语句性能优化)

下载并改变执行权限:wget +x tuning-primer.sh./tuning-primer.sh结果报告:会用几种颜色标记:蓝色:总指标绿色:表示此参数还可以红色:表示此参数有严重问题深红色:表示有问题参数黄色:一些信息提示而且还有警告:Note! This script will still suggest raising the join_buffer_size whenANY joins not using indexes are found.下面是一个报告的结果 xx@xxxxxx:~$ . ./tuning-primer.sh mysqld is alive-- MYSQL PERFORMANCE TUNING PRIMER --- By: Matthew Montgomery -MySQL Version 5.1.-enterprise-gpl-log x_Uptime = 4 days 0 hrs min 3 secAvg. qps = Total Questions = Threads Connected = 4Server has been running for over hrs.It should be safe to follow these recommendationsTo find out more information on how each of theseruntime variables effects performance visit: info about MySQL's Enterprise Monitoring and Advisory ServiceSLOW QUERIESThe slow query log is NOT enabled.Current long_query_time = . sec.You have out of that take longer than . sec. to completeYour long_query_time seems to be fineBINARY UPDATE LOGThe binary update log is enabledThe expire_logs_days is not set.The mysqld will retain the entire binary log until RESET MASTER or PURGE MASTER LOGS commands are run manuallySetting expire_logs_days will allow you to remove old binary logs automaticallySee THREADSCurrent thread_cache_size = Current threads_cached = Current threads_per_sec = 0Historic threads_per_sec = 0Your thread_cache_size is fineMAX CONNECTIONSCurrent max_connections = Current threads_connected = 4Historic max_used_connections = The number of used connections is % of the configured maximum.Your max_connections variable seems to be fine.MEMORY USAGEMax Memory Ever Allocated : . GConfigured Max Per-thread Buffers : . GConfigured Max Global Buffers : 6. GConfigured Max Memory Limit : . GPhysical Memory : 8. GMax memory limit exceeds % of physical memory(内存设置严重有问题!--By Me)KEY BUFFER * / * Current MyISAM index space = 8 KCurrent key_buffer_size = 2. GKey cache miss rate is 1 : Key buffer free ratio = 0 %Your key_buffer_size seems to be too high.Perhaps you can use these resources elsewhere(错误参数设置:query_cache_size > query_cache_limit --By Me)SORT OPERATIONSCurrent sort_buffer_size = 4 MCurrent read_rnd_buffer_size = MSort buffer seems to be fineJOINSCurrent join_buffer_size = . KYou have had 1 queries where a join could not use an index properlyYou should enable "log-queries-not-using-indexes"Then look for non indexed joins in the slow query log.If you are unable to optimize your queries you may want to increase yourjoin_buffer_size to accommodate larger joins in one pass.Note! This script will still suggest raising the join_buffer_size whenANY joins not using indexes are found.( join_buffer_size设置过小,另外存在一个查询使用了join但是没有走索引 --By Me)OPEN FILES LIMITCurrent open_files_limit = filesThe open_files_limit should typically be set to at least 2x-3xthat of table_cache if you have heavy MyISAM usage.Your open_files_limit value seems to be fineTABLE CACHECurrent table_open_cache = tablesCurrent table_definition_cache = tablesYou have a total of 0 tablesYou have open tables.

TABLE SCANSCurrent read_buffer_size = 2 MCurrent table scan ratio = : 1You have a high ratio of sequential access requests to SELECTsYou may benefit from raising read_buffer_size and/or improving your use of indexes.TABLE LOCKINGCurrent Lock Wait ratio = 1 : Your table locking seems to be fine

MySQL分组查询Group By实现原理详解 由于GROUPBY实际上也同样会进行排序操作,而且与ORDERBY相比,GROUPBY主要只是多了排序之后的分组操作。当然,如果在分组的时候还使用了其他的一些聚

mysql 松散的索引扫描(Loose index scan) 优化GroupBy最有效的办法是当可以直接使用索引来完全获取需要group的字段。使用这个访问方法时,MySQL使用对关键字排序的索引的类型(比如BTREE索引)

MySQL学习笔记小结 慢速SQL:执行时间超过给定时间范围的查询就称为慢速查询。在MySQL中如何记录慢速SQL?答:可以在my.cnf中设置如下信息:[mysqld];enabletheslowquerylog,default1

标签: mysql语句性能优化

本文链接地址:https://www.jiuchutong.com/biancheng/347547.html 转载请保留说明!

上一篇:MySQL学习第四天 Windows 64位系统下使用MySQL(mysql几天能学会)

下一篇:MySQL分组查询Group By实现原理详解(mysql查询分组后 组内数据)

  • 天猫提现一直没到账
  • 增值税期末留底退税政策解读
  • 企业境外投资管理办法
  • 增值税纳税申报表在哪里打印
  • 存货报废进项是否要转出
  • 年终奖计入工伤赔偿
  • 文化事业建设费怎么申报
  • 利润率的百分比
  • 延期利息增值税可以抵扣吗
  • 一季度计提的所得税分录
  • 什么是资本性支出和支出
  • 主营业务收入计入
  • 汇兑损益结转贷方怎么调整到借方
  • 公务接待和商务服务区别
  • 支票的填写前应检查有哪些内容
  • 固定资产什么时候入账
  • 产品在海关发生质量问题
  • 收到运输发票需要开票吗
  • 所得税弥补亏损年限10
  • 免税收入的财税处理
  • 发票税额小数点后面没打印上能用吗
  • 增值税附表一免税项目金额填不上
  • 个人销售比例用什么函数
  • 长期待摊费用以后怎么摊销
  • 计提增值税的账务处理小规模
  • 软件行业的收入怎么样
  • 房地产开发企业所得税管理办法
  • 个人所得税的征收
  • 别的公司代缴社保合法
  • linux开启
  • 全部投资内部收益率
  • 上月库存占比怎么算
  • 公司开业需要怎么布置
  • 处置子公司属于调整事项吗
  • mac os右键
  • 企业购入固定资产,价值3000元,误记入管理费用账户
  • wordpress介绍
  • 捐赠支出汇算清缴需要调增吗
  • win7纯净版系统之家
  • php ajax 实现
  • 美国华盛顿山在哪里
  • 红字发票步骤
  • java本地缓存框架有哪些
  • xml格式化输出
  • php 并发 解决方案
  • 药品进销差价的计算公式
  • 什么是市盈率和市净率,谈谈你对两个指标的理解
  • 研发 专利
  • 旅行社代订机票的发票可以抵税吗
  • 新公司建账初始数据
  • 生产部门包括
  • db2自增函数
  • 总资产报酬率的公式
  • 按差额缴纳增值税
  • 先征后退增值税是否征收企业所得税
  • 出国人员差旅出差补贴标准
  • 外贸企业的退税可以转出来吗
  • 可供出售金融资产包括哪些内容
  • 分类法与品种法相比,最大的区别是
  • 实缴制下未到位资金
  • 会计账务做得混乱的原因
  • 资金账簿印花税税率
  • sql只能查询数据,不能修改数据
  • mysql 授权命令
  • mysql 5.7.18 winx64密码修改
  • win7系统桌面图标设置
  • Win7打印机驱动备份
  • win8删除所有内容
  • lol进入游戏后电脑没声音
  • window 启动
  • xp系统怎么卸载驱动程序
  • win10怎么看下载的软件
  • perl中的$_
  • 编写注册表文件
  • jQuery基于muipicker实现仿ios时间选择
  • 焦点问题是什么
  • 河北省职称证去哪里查
  • 如何挑选烟叶等级
  • 季度申报成功与否怎么查询
  • 重庆医疗app
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设