Best practice: profile before adding memcached?

BUSTARRET, Jean-Francois JFBUSTARRET at tf1.fr
Tue Feb 6 09:32:48 UTC 2007


> > at the time the developer is writing the query, they should 
> make sure
> > the query is fast and efficient, if they are not sure, use 
> the explain
> > statements.
> 
> Sure, but his question is specifically about adding memcached to an 
> existing application.  In that case, you are past the explain 
> stage.  He 
> needs to learn where the bottlenecks are for his application.  They 
> could not be SQL related at all.  We have found there are 
> large blocks 
> of code that we want to skip and memcache the resulting data 
> from them.

And these are usualy very difficult to find without profiling, because
you can't log them... Finding/tuning slow queries is quite easy.

Like many, I remember tuning 200ms SQL queries executed sometimes before
finding a 800ms block of code (with no DB access) executed quite
often...


More information about the memcached mailing list