And what is also frustrating is because of the current implementation of
the qcache, you can't use SQL_NO_CACHE keyword to skip this search, and
only use the qcache when it really makes sense (see
http://bugs.mysql.com/bug.php?id=37416).
Jocelyn
MARK CALLAGHAN a écrit :
> The query cache has a mutex that is locked while it is searched. This
> is not a spin lock, so many threads will go to sleep when there is
> contention. And it is made worse because work is done to create the
> search key in Query_cache::send_result_to_client() (work == memory
> allocation and other byte copying) after the mutex is locked.
>
> Are there plans to fix this?
> I don't have benchmark results (yet), but I am willing to bet that
> this is a problem.
>