MySQL is slower than it probably should be

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.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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