----- Original Message ----- > From: "Raphael Bauduin" <rbli...@gmail.com> > > And the query_cache_min_res_unit is 4096 . > > I'm not sure what the meaning of a block is. For the query cache size
What you calculated is the *average* block size, which is fairly useless :-) The query cache is not formatted into fixed-size blocks, like a disk would be. Instead, a block is a contiguous unit of free or used space, and the minimum that gets allocated is query_cache_min_res_unit. Have a good look at the number of free blocks, then run FLUSH QUERY CACHE (don't worry, that doesn't empty it, despite the name) and look again. It should be much lower. FLUSH QUERY CACHE will defragment the query cache, and create a single contiguous free block; which makes it easier to store large results without having to expire some older ones. It does lock the cache for a moment, especially with large caches; so you shouldn't run it every five minutes; but it can be well worth it to occasionally run it. Also, don't confound that with RESET QUERY CACHE, which *will* empty it, and can thus get your disks trashed on busy machines :-) -- Linux Bier Wanderung 2012, now also available in Belgium! August, 12 to 19, Diksmuide, Belgium - http://lbw2012.tuxera.be -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql