This addition to the crontab is used to verify the database integrity and then to optimize the indexes and tables.
Add the following to the /etc/crontab
30 22 * * * root mysqlcheck -A -e –user={YOUR OPENEMR DB USER} –password={YOUR OPENEMR DB PASSWORD} openemr
35 22 * * * root mysqlcheck -A -a –user={YOUR OPENEMR DB USER} –password={YOUR OPENEMR DB PASSWORD} openemr
40 22 * * * root mysqlcheck -A -o –user={YOUR OPENEMR DB USER} –password={YOUR OPENEMR DB PASSWORD} openemr