List:General Discussion« Previous MessageNext Message »
From:Johan De Meersman Date:July 15 2013 2:30pm
Subject:Re: Mysql cache issues???
View as plain text  
----- Original Message -----
> From: "Hartmut Holzgraefe" <hartmut@stripped>
> Subject: Re: Mysql cache issues???
> 
> can, and *will* ... see also http://dom.as/tech/query-cache-tuner/

Absolutes are never right.

The query cache is a very useful tool, even though it's implementation leaves something to
be desired.

If your workload is predominantly writes, turn it off. If it's predominantly repeated
reads (think webservers), turn it on.

If your workload is somewhere in-between, you may want to turn it on and selectively use
the SQL_NO_CACHE hint; or you could set it to 2 (on-demand) and use the SQL_CACHE hint.
As always, it depends on your particular situation, not on what someone else has deemed
to put on a website.

As for optimal sizing... that's the hard bit, really - you have to find a balance between
stuffing as many queries in as possible, and the lock-up of everything and the kitchen
sink when there's an invalidation. I find that 200M is workable for sites that have a
pretty low write/read ratio.

In any case, your first recourse should be optimizing your actual queries, the qcache is
really just a cheap win if you've already done the rest of the work.


-- 
Unhappiness is discouraged and will be corrected with kitten pictures.
Thread
Mysql cache issues???Egoitz Aurrekoetxea15 Jul
  • Re: Mysql cache issues???Johan De Meersman15 Jul
    • Re: Mysql cache issues???Egoitz Aurrekoetxea15 Jul
  • Re: Mysql cache issues???Hartmut Holzgraefe15 Jul
    • Re: Mysql cache issues???Reindl Harald15 Jul
      • Re: Mysql cache issues???shawn green15 Jul
        • Re: Mysql cache issues???Reindl Harald15 Jul
          • Re: Mysql cache issues???Egoitz Aurrekoetxea15 Jul
            • Re: Mysql cache issues???Reindl Harald15 Jul
            • Re: Mysql cache issues???shawn green15 Jul
              • Re: Mysql cache issues???Johan De Meersman16 Jul
                • RE: Mysql cache issues???Rick James22 Jul
                  • RE: Mysql cache issues???Johan De Meersman22 Jul
    • Re: Mysql cache issues???Johan De Meersman15 Jul