Hello,

I've been looking for information related to best practice on how to 
OPTIMIZE TABLE <table name> with out taking the database offline. I 
understand that it is not good to run an optimize while the database is 
being used. So what is a good way of handling this?

In my particular application, there are constant inserts going on, and I'm 
doing a delete on older records, and then optimize the table. It's 
important to not lose any of those inserts, however I realize that may not 
be possible, so it is acceptable to loose some.


The only methods I've thought of are:

1. revoke the user's insert permission, then optimize the table, and then 
grant the permission's back.
2. Rename the table, then optimize the table, and rename it back to the 
original
3. stop mysql, use myisamchk to optimize the table, then start mysql

Is there a better way?

thanks in advanced!!!!

Your friendly neighborhood SA,
phiLLip

Reply via email to