Scalability of Using MySQL as a Key/Value Database

There is no doubt that using a NOSQL solution is going to be faster, since it is simpler.
NOSQL and Relational do not compete with each other, they are different tools that can solve different problems.
That being said for 1000 writes/day or per hour, MySQL will have no problem.
For 1000 per second you will need some fancy hardware to get there. For the NOSQL solution you will probably still need some distributed file system.

It also depends on what you are storing.


I'd say that you'll have to run your own benchmark because it is only you that knows the following important aspects:

  • the size of the data to be stored in this KV table
  • the level of parallelism you want to achieve
  • the number of existing queries reaching your MySQL instance

I'd also say that depending on the durability requirements for this data, you'll also want to test multiple engines: InnoDB, MyISAM.

While I do expect some NoSQL solutions to be faster, based on your constraints you may find out that MySQL will perform good enough for your requirements.


SQL databases are more and more used as a persistance layer, with computations and delivery cached in Key-Value repositories.

With this in mind, those guys have done quite a test here:

  • InnoDB inserts 43,000 records per second AT ITS PEAK*;
  • TokuDB inserts 34,000 records per second AT ITS PEAK*;
  • This KV inserts 100 millions of records per second (2,000+ times more).

To answer your question, a Key-Value repository is more than likely to outdo MySQL by several orders of magnitude:

Processing 100,000,000 items:

kv_add()....time:....978.32 ms
kv_get().....time:....297.07 ms
kv_free()....time:........0.00 ms

OK, your test was 1,000 ops per second, but it can't hurt to be able to do 1,000 times more!

See this for further details (they also compare it with Tokyo Cabinet).