Report this

What is the reason for this report?

MySQL is slower than it probably should be

Posted on September 26, 2019

We are planning to migrate our multi-website (one hosting, multiple websites) system from shared hosting to DO but got stuck at slow database speeds. Our current hosting DB selects 2000 rows from table in around 100ms while on DO it takes around 180ms (compared to 3ms on local nvme drive :O). Upgrading / switching to optimized droplets does not help at all. We tried to use MySQL 8, 5.7 and also MariaDB 10.1 with the same result.

This is causing the frontpage for our websites to be 40% slower than usual. Also AWS is running fast. Any ideas? We love DO that’s why we would like to use it.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @lamka02sk,

Just upgrading your droplet might not help if you have set some limits to your configuration file. You might need to edit your my.cnf file so that everything suits your needs.

If you are wondering what values to use, there are some tools to help you out. One that I use is MySQLTunner

Additionally, I’ll suggest you to create a slow query log for your MySQL/MariaDB instance and see if there are any queries causing this slowness.

Kind regards, Kalin

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.