In infinite wisdom sangprabv <sangpr...@gmail.com> wrote: > My physical RAM is only 16Gb. I am afraid it will freezed the server > if I set key_buffer_size (> 23.2G). Any suggestion to optimize it? > Thanks for any response. >
IIRC, on Linux, Mysql will scale back the settings it sees that you are trying to allocate more memory to mysql than what is actually present in the box. - Check if you have any duplicate indexes (<http://forge.mysql.com/tools/tool.php?id=45> or mk-duplicate-key-checker from maatkit toolkit) - if you have indexes of varchars, check if you are using column prefixes for indexes, and if not, try using that (i.e. have a index on name(10), instead if name) - Analyze your SELECT queries to see which tables are used most often and increase the key buffer size to hold at least the indexes from those table in the memory. (the 80/20 rule might be applicable here) - If you have been doing lots of deletes, you should get some benefit from optimize table or by doing "myisamchk -f" (in other words, rebuilding your index) -- Raj Shekhar - If there's anything more important than my ego around, I want it caught and shot now. - Read the latest at my blog: "casio's g-shock watch" <http://rajshekhar.net/blog/archives/360-casios-g-shock-watch.html> -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org