Not the answer you need?
Register and ask your own question!

Question about percona Query Cache Enhancements

rj03hourj03hou EntrantCurrent User Role Beginner
Read your document,you said the Percona Server disabling the cache completely.
I want to ask in the standard mysql version,when we set query_cache_type=0,what happens?
Still lock,but check query_cache_type=0,and return immediately?The lock is not disable completely and make some cpu consume?


  • sterinsterin Mentor Inactive User Role Contributor
    Still lock,but check query_cache_type=0,and return immediately?

    Should be written as:
    Still lock,but check query_cache_type=0,and return immediately after consuming some time and cpu!

    The definition of immediately if you do something 1000-3000 times a second can be after a proportionally very long time ;).
  • rj03hourj03hou Entrant Current User Role Beginner
    /* Testing 'query_cache_size' without a lock here is safe: the thing we may loose is that the query won't be served from cache, but we save on mutex locking in the case when query cache is disabled. See also a note on double-check locking usage above. */ if (is_disabled() || thd->locked_tables_mode || thd->variables.query_cache_type == 0 || query_cache_size == 0) goto err;</pre>

    I read the code,I find the check section is same and don't find anything different with the standard mysql version.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.