Is memcached really faster than MySQL on very simple query?

Perrin Harkins perrin at
Thu Jul 13 14:56:35 UTC 2006

howard chen wrote:
> seems MySQL is quite efficient in handling simple query?

 From Perl, MySQL used to be about twice as fast as Memcached on simple 
queries.  Then Brad tweaked the client code a bit, and it's about on par 
now, as you saw in your test.  I suspect this is still mostly because of 
the client code -- the server is probably doing less than MySQL, so it 
should be faster, but DBI/BDB::mysql are written in C and 
Cache::Memcached is not.  If that long-rumored XS client ever comes out, 
I expect it will be faster than MySQL every time.

- Perrin

More information about the memcached mailing list