Is memcached really faster than MySQL on very simple query?

Andrew Harbick aharbick at aharbick.com
Thu Jul 13 13:19:26 UTC 2006


The question is kinda answered on the memcached homepage:
    http://www.danga.com/memcached/

with the "Shouldn't the database do this?"
          "What about MySQL query caching?" and
          "Is memcached fast?"

questions.

Andy

Jamie McCarthy 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 :)


More information about the memcached mailing list