I have two issues I am dealing with. I am a Web app administrator who got a database position foisted upon me and I am just getting my feet wet with MySql.
Here is the problem: a query we run to truncate old data from a database is corrupting the indexes on that table. Here is the query: $EXECPATH/mysql --host=IP --user=user --password=pass --execute="delete from MESSAGES where to_days(now()) - to_days(timestamp) > 2 and sent = 'Y'" test When I run the query from command line, 100s (if not thousands) of the folowing errors get thrown on the screen: ERROR 1062 at line 2998: Duplicate entry '4730785' for key 1 What exactly is this denoting? The script was working when we were using MySql 3.x but 4 has broken it. The other issue is related to optimizing performance. I have the following numbers with query: SHOW STATUS LIKE 'key%' +--------------------+-----------+ | Variable_name | Value | +--------------------+-----------+ | Key_blocks_used | 7479 | | Key_read_requests | 111174535 | | Key_reads | 1893305 | | Key_write_requests | 6325172 | | Key_writes | 6628208 | +--------------------+-----------+ Does this look like a candidate for increasing the key_buffers? Thanks, Ben Ricker Wellinx.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]