Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This blog provides best practices for optimizing MySQL database performance in Azure Virtual Machines running Windows. Below are couple of quick steps that can be performed during virtual machine setup:
Below are some of the settings that can be performed on MySQL database itself to get higher performance:
Above settings can be changed in my.ini file (under mysqld section) that resides under your MySQL Installation. If you installed (MySQL 5.6) with default settings, it will be under %PROGRAMDATA%\MySQL\MySQL Server 5.6\my.ini. Location may change based on the version installed. Another way of changing these settings is through MySQL Workbench ( Administration – Options File).
You can run benchmark tests on your VM after tuning these parameters and create baseline tests and further tune the database to see if you are getting better performance.
You can also turn on slow_query_log and use long_query_time to log slow queries taking more than the value set ( in seconds). This provides insights into which query is running slower and provides an opportunity to tune the query.
Note: All these should be tested on your testing/staging environment before moving them to production.
Please sign in to use this experience.
Sign in