2

I'm new to db management and db tweaking. I'm using mysqltuner to get recommendations for how to improve db performance.

Mysql issues a warning message along with its recommendations: "MySQL started within last 24 hours - recommendations may be inaccurate." It is true that I started MySQL within the last 24 hours, but why does this matter? What does the database do over a 24 hour period that will change the results of mysqltuner?

  • Ignore mysqltuner's recommendation to Optimize the tables; it is bogus. If you would like another, perhaps more thorough, review, please provide RAM size, SHOW VARIABLES; and SHOW GLOBAL STATUS;. (Probably need post.it or other service, since there is a size limit on this forum.) – Rick James Oct 22 '16 at 23:29
4

It is a basic caution that a MySQL instance running under 24 hours (1 day) may not have seen the entire query workload and thus the recommendations might be affected.

Of course, 24 hours doesn't guarantee the entire workload either, as you might have scripts that run weekly or monthly.

On a separate note, I would caution you on taking the advice of mysqltuner too strictly. Specifically don't make any changes that you don't fully understand just because the script says to do so.

  • In fact, I recommend having a read through this blog post as one example of tuning MySQL: vividcortex.com/blog/… I'm not advocating for you to use VividCortex, but there are good resources, including the ebook if you are new to tuning MySQL. – Derek Downey Oct 19 '16 at 17:06
  • By the same logic, if the MySQL instance is not being used, or is being used in ways that are not representative of how it will normally be used, will that mean the recorded query workload will be unrepresentative? And so the recommendations could be inaccurate as well? – danxinnoble Oct 19 '16 at 17:23
  • Absolutely. Which is the danger of tuning scripts. For someone new to MySQL tuning, I'd use it to get a feel for what it's checking for, and then dig into the details of why it's checking those before making changes. – Derek Downey Oct 19 '16 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.