if ( $db_clean_msg > 0 ) {
$res = db_res("DELETE FROM `sys_messages` WHERE `Date` < NOW() - INTERVAL $db_clean_msg DAY");
if ( $res ) {
$db_clean_msg_num = db_affected_rows();
db_res("OPTIMIZE TABLE `sys_messages`");
}
}
I am wondering if the Optimize Table is causing this?