MySQL maintenance – how to clear the buffer

database-administrationdatabase-performanceMySQLPHP

We have a server running our PHP/MySQL-based web application which is SLOW.

My predecessor says:

We used to do database maintenance, which used to clear the buffer, cached and unwanted variables.

And I wonder what on earth he means with that statement? Does he mean a simple optimize of the tables? Or the query cache? I understand MySQL but don't really know what he is describing.

I would appreciate any pointers.

Best Answer

If their maintenance operations were performed on a running server, I can only think of a "flush table" (From MySQL manual: Closes all open tables, forces all tables in use to be closed, and flushes the query cache. FLUSH TABLES also removes all query results from the query cache).

But maybe they were just restarting the server ...

For the "slow" part, assuming you're running an unix system, you could try to use mysql-tuning-primer or mysqltuner.pl to have some clue about what you could change in your server configuration