×
Create a new article
Write your page title here:
We currently have 3,187 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,187Articles

    mysql performance tuning[edit]

    query cache example

    mysql> show status like "%Qcache%";
    +-------------------------+----------+
    | Variable_name           | Value    |
    +-------------------------+----------+
    | Qcache_free_blocks      | 1        |
    | Qcache_free_memory      | 18481592 |
    | Qcache_hits             | 82184    |
    | Qcache_inserts          | 50875    |
    | Qcache_lowmem_prunes    | 0        | #should be like 0 if not, chache size is too small
    | Qcache_not_cached       | 28127    |
    | Qcache_queries_in_cache | 22048    |
    | Qcache_total_blocks     | 44200    |
    +-------------------------+----------+
    8 rows in set (0.03 sec)
    

    in the table variables is a opportunity to set some values:

    mysql> show variables like "%query_cache%";
    +------------------------------+----------+
    | Variable_name                | Value    |
    +------------------------------+----------+
    | have_query_cache             | YES      |
    | query_cache_limit            | 1048576  |
    | query_cache_min_res_unit     | 4096     |
    | query_cache_size             | 41943040 |
    | query_cache_type             | ON       |
    | query_cache_wlock_invalidate | OFF      |
    +------------------------------+----------+
    6 rows in set (0.00 sec)
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.