Hi, I changed db from SQLite to MySQL and I'm getting slower response time on each simple PUT method call. This is suspicious to me, since it should be faster using MySQL. So I tested the same application on a different account that was already using MySQL and I get response times = [0.047, 0.031, 0.034, 0.032, 0.032 ... ] which is very satisfactory; however on this account, I am getting [0.126, 0.113, 0.110, 0.134, 0.123 ...]
Clearly I did something terrible in between the steps. To describe how I set up MySQL this time, I did following steps:
- Setup password by going into Database tab
- pip install mysqlclient
- Changed setting.py DATABASE configuration (https://help.pythonanywhere.com/pages/UsingMySQL/)
- python manage.py migrate (I would like note that this process took about 10 min)
Also, If I switch the DATABASE configuration from MySQL to SQLite on Django Setting.py, I get relatively faster response time. This is very strange.
Although, this performance drop isn't too significant (but yes it still bothers me :D), I still want to know why and possibly learn few things from this experience. I would appreciate for any advice/enlightenment!