Is memcached really faster than MySQL on very simple query?
Christopher Schmidt
crschmidt at crschmidt.net
Thu Jul 13 10:59:22 UTC 2006
On Thu, Jul 13, 2006 at 06:48:19PM +0800, howard chen wrote:
> seems MySQL is quite efficient in handling simple query?
Memcached is designed to run as a distributed query cache. The
expectation is that you're running against several memcached servers,
which allows you to distribute your memory caching against multiple
machines.
MySQL has a built in query cache that would store the results of any
simple test for a short period of time.
Your test in this case is not a use case that memcached is designed to
exceed performance of the MySQL query cache in. Unless you have multiple
machines in which you are distributing your cache, setting the MySQL
query cache to use just as much memory as Memcached will usually work
just as well.
(There may be exceptions to this rule, but your test isn't one of them.)
To respond to your queston: No. Memached is not designed to outperform
MySQL on a loop over the exact same query over and over again, so it's
not faster.
--
Christopher Schmidt
Web Developer
More information about the memcached
mailing list