Is memcached really faster than MySQL on very simple query?

howard chen howachen at
Fri Jul 14 16:48:36 UTC 2006

On 7/13/06, Jamie McCarthy <jamie at> wrote:
> MySQL is a centralized bottleneck, is hard/expensive to add
> performance to, and has highly nonlinear performance
> characteristics.  Memcached is decentralized, cheap/easy to add
> performance to, and runs very close to O(1).
> So the big win for memcached is not that it is faster than mysql,
> but that it takes load off mysql.
> If you can move 1000 simple queries per second from your (expensive)
> mysql replicator slave network to your (cheap) memcached network,
> then even if those queries run slightly slower (which I doubt), you
> will be ahead.  Your mysqls are freed up to do the complex queries
> only they can do, they will run those lengthy queries faster which
> will be a net gain in performance for your application, and they
> will have more breathing room before the load wedges them up and
> effectively takes your whole application down.
> Is there an FAQ yet?  I nominate this as one entry :)
> --
> Jamie McCarthy
> jamie at

Hi all,

I think no people questioning about the practical use of Memcahed (we
all know about it, otherwise there is no point in sending to this ML), but
just consider the followings...

1. MySQL is a complete, heavy, bulky DBMS, in the above example, in every
loop, the script prepare the SQL statement, retrieve data from disk (prepare
statement can't have query cache!!), and it is still faster then mencached
where data are being stored in memory, and we believed that memcached is an
optimized, lightweight server.

2. If the bottom-neck is due to the Perl Client, then, are there any
faster client (written in C) for memcached? People not aware of this slow
down or they just satisfied with this?

the purpose of my email is want to help memcached be a better software, no
to challenge its usefulness...

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the memcached mailing list