Forums

MySQL db slow - Django2 migrate

Hello,

It's been two days I'm working on a django project each migrate take more than 20minutes to finish. Doing a simple show databases; statement takes more than 20sec.

Is there any parameters I can tweak to improve MySQL perf ?

Thanks, Regards,

show databases specifically can be slow on PythonAnywhere, but other DB stuff should not be. What's the migration doing?

Hello, I have absolutely the same problem. Even simple migrations (adding a column) take several minutes. Also, pages that use the database began to load several times slower.

Thanks for letting us know. You're both using the same underlying server, and it looks like there are some out-of-control queries running there that we can't kill using our normal tools. We're rebooting it.

OK, it's back now. Could you check and see if things are any better now?

I'm just doing the initial tables creation, nothing fancy or heavy. Thanks, I just noticed the reboot, it interrupted my migrate command... Try again and keep you posted.

Works just fine now, it took only few seconds, thanks! :)

Excellent, thanks for confirming! We'll keep an eye on that server just in case it's not just a one-off problem.

Hi, I'm having the same problem where simple migrations are very slow (several minutes) on mysql. Is it possible there's a similar server problem currently? Thanks!

There isn't a server issues at the moment. Be aware that "simple" migrations to humans may not be simple to database servers. For instance, operations on indexes may involve re-indexing the table.