Saturday 15 May 2010

ubuntu - MySQL is extremely slow on EC2 -


I have found that on MySQL EC2 (Ubuntu 12.10) can be very slow. This takes only 700 mms for a set of SQL queries on my local PC (Windows 7), while on EC2 it requires more than 13 plus.

The database is very small, just about 12MB of query, there is almost no disk IO. However, EC2 example is 20x slow. All databases are based on the same dump: the same tables and the same index queries return the same results. The only difference is the execution time.

I tried M1.small and M2.xlarge (which is 7 times the computing power compared to M1.small) - the result is the same: Queries take almost the same time both on the server and Both are very slow.

Why can this happen?

The problem was with MySQL 5.5 which performs the subkey inefficiently. MySQL 5.6 running my home PC Which is far better in this regard. That's why I upgraded MySQL to EC2 on version 5.6 and it became faster as my home PC (as far as the query is concerned only).

No comments:

Post a Comment