There are workloads for which MyISAM is faster. But we should stop saying MyISAM is faster. This is repeated too often with neither qualification nor quantification. So I will take a turn. Either my results are bogus or InnoDB is faster (for most workloads). Regardless, tmcalloc makes everything in MySQL faster. I am not the first to say this and this isn't the first time I have said this, but I have pretty graphs to accompany my statement.
MyISAM has several advantages versus InnoDB, but it also has several performance problems:
- readers block writers and writers block readers with the exception of insert-append
- data blocks are not cached by the MySQL server
- there is a global MyISAM index cache (key cache) protected by one mutex. Tables can have their own key cache which I hope is protected by a separate mutex, but this doesn't reduce contention for workloads that are isolated to one or a few tables
- sysbench test args: --test=oltp --oltp-read-only --oltp-table-size=1000000 --max-time=60 --max-requests=0 --db-ps-mode=disable
- server with 8 CPU cores
- dataset is cached in memory
- sysbench client and mysqld ran on the same server
- unmodified MySQL 5.0.75 and Google-patched MySQL 5.0.37. The Google patch includes the use of tcmalloc.
This plots the performance of InnoDB, MyISAM and Blackhole for patched 5.0.37. InnoDB is much faster than MyISAM.
This plots the performance of InnoDB, MyISAM and Blackhole for unmodified 5.0.75. InnoDB is a bit faster than MyISAM.