mysql Query cache [tips]

上一篇 / 下一篇  2007-03-14 12:12:49 / 个人分类:LAMP

木铎校园 BBS 社区2N u(HA0M7Z-o7O4B

To set the size of the query cache, set the query_cache_size system variable. Setting it to 0 disables the query cache. The default size is 0, so the query cache is disabled by default.

)[#tRe z8} yV6ZN0

m Y$j?})m]n1e0When you set query_cache_size to a non-zero value, keep in mind that the query cache needs a minimum size of about 40KB to allocate its structures. (The exact size depends on system architecture.) If you set the value too small, you'll get a warning, as in this example木铎校园 BBS 社区j,y8JzZ6HuE


g2FI!S.Yh-O)i0木铎校园 BBS 社区,j,@3BCs5TL\


q;P;e5M x+z0

I8|XuZ5mQxg0

(GE!U0M.ku&ohy0mysql> SET GLOBAL query_cache_size = 41984;木铎校园 BBS 社区#rV:N^&\.U0m

u7K~U5DC7z+m0 Query OK, 0 rows affected (0.00 sec) 木铎校园 BBS 社区*|5]2w(Em.Y&o;f]]

5B X QI/M0木铎校园 BBS 社区p'[^4`y5X Pi$v

mysql> SHOW VARIABLES LIKE 'query_cache_size';

f8S,k Id,q.c(b0木铎校园 BBS 社区_EX.c-\u0Gd b

+------------------+-------+| Variable_name | Value |木铎校园 BBS 社区f,pP+MI2Dx)LPs

木铎校园 BBS 社区k0GL5^M|5Z~2R

+------------------+-------+| query_cache_size | 41984 |+------------------+-------+

}Q+C O/uZr.r;M;q0

TAG: LAMP

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

关于作者