位置: 编程技术 - 正文

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查询分组后 组内数据)

  • 带息负债融资成本率意义
  • 公司不开票要交工会经费吗
  • 公司股权变更要查账吗
  • 既简易计税又一般计税的进项专票可以抵扣吗
  • 动产租赁适用税率
  • 去年工资计提错误,今年如何修改
  • 餐饮业购买的油类有哪些
  • 季度对账单 怎么处理
  • 部分红冲的发票怎么开
  • 咨询公司所得税税负率是多少合适
  • 必胜客发票提取码在小票哪里
  • 企业外币账户怎么开通
  • 应计提的存货跌价准备
  • 用外购存货投资分录怎么写?
  • 个人电话费发票可以入账吗
  • 甲供材料工程如何办理结算
  • 水利建设基金有优惠政策吗
  • 个人领取住房公积金需要什么材料
  • 农民专业合作社属于什么企业类型
  • 月末在产品直接人工成本怎么算
  • 个体工商户做账可以做工资吗
  • 固定资产计算折旧时用扣除减值吗
  • 个体工商户未给员工缴纳社保
  • 工人的意外险如何赔付
  • 增值税纳税人申报表怎么填写
  • nod32kui.exe - nod32kui是什么进程 作用是什么
  • 固定资产计提完折旧怎么处理
  • 一般纳税人资质证明文件去哪打印
  • 简易征收的分录
  • 出租商品计入什么科目
  • winrar压缩后生成的文件格式
  • fodhelper.exe是什么程序
  • 网线超五类好还是六类好
  • 若依管理系统前端代码分析
  • 退回的企业所得税怎么做账
  • 小微企业城建税及附加减免优惠
  • 所得税季报本月数是指
  • php事件机制
  • 个体工商户的酒店增值税率是多少
  • 土石方工程的税费缴纳方法
  • 入库单正确填写方法
  • 帝国cms适合建什么站
  • 将织梦dedecms转换到wordpress
  • 辅助生产车间工人工资计入
  • 无偿受让股权是利好吗
  • 工程施工会计科目是什么科目
  • 关联债资比例是什么意思
  • sql server 链接
  • 扣员工工作服费用合法吗?
  • 制造费用包括哪些部门
  • 专款支出和事业支出
  • 当月扣缴社保分录
  • 年报审计调整
  • 税控盘服务费什么样的发票可以抵扣
  • sqlserver性能优化5种方式
  • linux里top
  • 如何避免系统性风险
  • dsapi.exe是什么
  • ubuntu怎样调出命令行
  • centos7tar解压
  • win8跳过开机密码
  • win7怎么设置工作组共享
  • win7微软账户
  • javascript详解
  • 利用nodejs实现百度文本审核
  • android 退出app
  • jquery选择器的使用
  • nodejs获取get请求参数
  • js onkeypress与onkeydown 事件区别详细说明
  • js时间范围
  • 基于zepto的移动端轻量级日期插件--date_picker
  • javascript中的数据类型分为两大类
  • JAVAscript字符串类型单引号和双引号意一样吗
  • 百望税控盘电子发票怎么打
  • 长春税务局电话举报
  • 一月份纳税申报
  • 输入税控盘密码是填证书口令吗
  • 企业自有房屋需要交税吗
  • 宝安区西乡税务所长
  • 增值税专用发票怎么开
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设