I recently had a similar problem, however you may find that its more of a case of correctly indexing your tables.
Yyou should look for the tables which need indexing, I enabled the slow-query-log as well as enabling of logging of queries which didn’t use indexes and found some which did some very nasty table scans. This can seriously degrade your performance, if you can find the queries in question then modify/add indexes or change sql which will reduce number of rows scanned. Lines in my.cnf log-slow-queries = /var/lib/mysql/data/slow.log set-variable = long-query-time=5 log-long-format # this will log selects not using indexes Then simply tail the log when you have issues to find which ones need optimizing. BTW - above is using Mysql 4 so syntax may be diff with your version PM -----Original Message----- From: BD [mailto:[EMAIL PROTECTED] Sent: Saturday, 8 January 2005 2:07 AM To: mysql@lists.mysql.com Subject: Slow queries, need advice on how to improve; key_buffer? Hi, I'm having a problem with slow query and parse times with a MySQL - PHP ecommerce application I am testing out. Also getting an error message with the key_buffer variable. I tried to improve MySQL speed/performance by adding key_buffer=50M to my my.cnf file for [mysqld]. When I restarted MySQL, I'm getting a "0 DB_ERROR_NOT_CONNECTED" error when visiting my php-MySQL web application via http. When I removed above and then restarted MySQL the error goes away. I read in my Widenius - MySQL book that I should use the command "set_variable=key_buffer=64M" (or some other memory limit - I have 1.2 gig of ram on server). I also tried this instead of adding the above to my.cnf. However upon logging on as root in mySQL and running the command, I'm, getting a command not found error. Can anyone tell me what I'm doing wrong with the above two attempts? Or give any advice as to how to improve speed of accessing the mySQL database for my web application? I'm running MySQL 3.23.56 on a linux box. Thanks anyone, BD -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.9 - Release Date: 6/01/2005 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.10 - Release Date: 10/01/2005 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]