MySQL vs. MSSQL on the Amazon Cloud

Recently I’ve been working on a application that requires some serious database performance and had chosen MySQL as the engine based on the common wisdom that MySQL is faster, and cheaper, than MSSQL. After some serious performance problems on a couple of local machines, I decided to use Amazon’s MySQL RDS service and compare it’s performance to their Windows 2008 / MSSQL 2008 instance. This is by no means and exhaustive study, but it is informative at least.

Amazon Instance Type

  • Large Instance 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of local instance storage, 64-bit platform

Table Structure

  • 5 VarChar(50) columns
  • ~2.1 Million Records
  • Un-Indexed
  • No Primary or Foreign Key Constraints

SQL Process

  • Table data copy using: INSERT INTO myTable2 (SELECT * FROM myTable1)

Processing Time

  • MySQL: Killed at +15 minutes
  • MSSQL: Completed at 1 minute 33 seconds

For large data moving operations, the winner is clear — MSSQL outperforms MySQL by an enormous margin. In further testing I’ve also found simple select operations on MySQL to be lacking as well. Looks like Microsoft had a leg up on the database world finally.

Advertisements