Oracle Vs Mysql

September 22, 2014 - 7:15pm
Submitted by gary

We can go on and on about feature differences on Oracle and Mysql. Table locking, stored proc, recovery, transaction control blah blah blah...
As a software user (yes, they are just regular software we use) I don't really care as long as it works and does what I need.

So today I want to get to the point and take note of the performance differences in Oracle and Mysql.

The key difference in Oracle over Mysql is its ability to perform fast CRUDs even under large number of threads and transactions.

For example, populate both databases with about 1,000,000 records. (I used oracle 11g (non express) and mysql 5.6)
now simulate 3 functions, (I used jdbc for this)

read(); //read the records in some order, like i = i +3 or something.
write(); //write to the same table with some random record, do some updates do some inserts.
delete(); //delete a random record from database.

fire about 100 threads, and run them in an infinite loop, run the exact same stuff,
then you will see Oracle performs much better.

The key difference in Mysql over Oracle is it performance faster CRUDs when is single threaded.

lets also do the samething above,
but this time, do the stuff in sequence, with 1 thread.

Now you will see mysql runs abit faster than Oracle.
you will see more differences if you remove some of the indexes from the tables. (some might argue that have some impacts on the actual data)

But anyway, in conclusion, Oracle is faster when handling any OLTP when you are dealing with ALOT of threads doing smaller transactions.

Mysql is better when your application focuses on single to small number of threads but doing ALOT of stuff per transaction.