MySQL Forums
Forum List  »  Performance

Re: Query Cache
Posted by: Harrison Fisk
Date: March 22, 2005 12:22PM

Hi,

The query_cache_size variable is measured in bytes. The 20KB you are setting it to is too small for it so it effectively turns it off.
When I tried it I got the following:

mysql> set global query_cache_size = 20000;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+-----------------------------------------------------------------+
| Level | Code | Message |
+---------+------+-----------------------------------------------------------------+
| Warning | 1282 | Query cache failed to set size 19456; new query cache size is 0 |
+---------+------+-----------------------------------------------------------------+
1 row in set (0.00 sec)


Try setting it to a larger size, the smallest possible size is around 50KB (even though that is extremely small), with a larger size more recommended. Common settings for it would be 8-64MB

Harrison Fisk, Trainer and Consultant
MySQL AB, www.mysql.com

Options: ReplyQuote


Subject
Views
Written By
Posted
2344
March 21, 2005 11:19PM
Re: Query Cache
1652
March 22, 2005 12:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.