• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

mysqlreport的使用_MySQL

mysql 搞代码 4年前 (2022-01-09) 19次浏览 已收录 0个评论

mysql参数怎么调是个问题,如果是Oracle,数据库报告上有很多建议,非常直观。mysql也有一个小工具mysqlreport,来统计一些信息指导调参数,最好是写一个任务,一个小时执行一次,这样可以看到高峰、低峰时期的统计信息,更有利于参数调优。

1.先下载dbi、dbd-mysql、mysqlreport-3.5。

2.安装dbi和dbd-mysql,安装之前确认安装过perl。
perl Makefile.PL
make
make test
make install

3.到mysqlreport-3.5的目录下执行

[root@VM-10 mysqlreport-3.5]# ./mysqlreport --user root --password root --host 10.10.15.208 --port 3316Use of uninitialized value in formline at ./mysqlreport line 1099.Use of uninitialized value $is in multiplication (*) at ./mysqlreport line 829.Use of uninitialized value in formline at ./mysqlreport line 1227.Use of uninitialized value in formline at ./mysqlreport line 1235.MySQL 5.6.25-log uptime 0 5:34:3 Wed Aug 26 17:12:54 2015__ Key _________________________________________________________________Buffer used 0 of 2.00G %Used: 0.00Current 373.45M %Usage: 18.24Write hit 0.00%Read hit 0.00%__ Questions ___________________________________________________________Total 757 0.0/sCom_ 1.26k 0.1/s %Total: 166.31-Unknown 805 0.0/s 106.34DMS 294 0.0/s 38.84COM_QUIT 9 0.0/s 1.19Slow 5 s 13 0.0/s 1.72 %DMS: 4.42 Log:DMS 294 0.0/s 38.84SELECT 294 0.0/s 38.84 100.00REPLACE 0 0/s 0.00 0.00DELETE 0 0/s 0.00 0.00INSERT 0 0/s 0.00 0.00UPDATE 0 0/s 0.00 0.00Com_ 1.26k 0.1/s 166.31admin_comma 800 0.0/s 105.68show_table_ 171 0.0/s 22.59set_option 148 0.0/s 19.55__ SELECT and Sort _____________________________________________________Scan 337 0.0/s %SELECT: 114.63Range 51 0.0/s 17.35Full join 0 0/s 0.00Range check 0 0/s 0.00Full rng join 0 0/s 0.00Sort scan 64 0.0/sSort range 1 0.0/sSort mrg pass 32 0.0/s__ Query Cache _________________________________________________________Memory usage 16.81k of 1.00M %Used: 1.64Block Fragmnt 100.00%Hits 0 0/sInserts 1 0.0/sInsrt:Prune 1:1 0/sHit:Insert 0.00:1__ Table Locks _________________________________________________________Waited 0 0/s %Total: 0.00Immediate 208 0.0/s__ Tables ______________________________________________________________Open 1 of 2000 %Cache: 0.05Opened 240 0.0/s__ Connections _________________________________________________________Max used 4 of 1000 %Max: 0.40Total 15 0.0/s__ Created Temp ________________________________________________________Disk table 20 0.0/sTable 472 0.0/s Size: 16.0MFile 67 0.0/s__ Threads _____________________________________________________________Running 1 of 2Cached 2 of 18 %Hit: 73.33Created 4 0.0/sSlow 0 0/s__ Aborted _____________________________________________________________Clients 8 0.0/sConnects 0 0/s__ Bytes _______________________________________________________________Sent 504.65M 25.2k/sReceived 51.91k 2.6/s__ InnoDB Buffer Pool __________________________________________________Usage 127.98M of 127.98M %Used: 100.00Read hit 97.36%PagesFree 0 %Total: 0.00Data 7.87k 96.12 %Drty: 0.00Misc 318 3.88Latched 0.00Reads 92.16M 4.6k/sFrom file 2.43M 121.3/s 2.64Ahead Rnd 0 0/sAhead Sql 0/sWrites 134 0.0/sFlushes 134 0.0/sWait Free 0 0/s__ InnoDB Lock _________________________________________________________Waits 0 0/sCurrent 0Time acquiringTotal 0 msAverage 0<span>本文来源gaodai#ma#com搞*代#码9网#</span> msMax 0 ms__ InnoDB Data, Pages, Rows ____________________________________________DataReads 2.46M 122.8/sWrites 87 0.0/sfsync 11 0.0/sPendingReads 0Writes 0fsync 0PagesCreated 0 0/sRead 3.54M 176.9/sWritten 134 0.0/sRowsDeleted 0 0/sInserted 0 0/sRead 65.10M 3.2k/sUpdated 0 0/s

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:mysqlreport的使用_MySQL
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址