I have been using Postgres and MySQL for a long time now. There are a few routine maintenance chores that must be performed on a regular basis to keep a PostgreSQL server running smoothly. As as example
PostgreSQL's VACUUM command must be run on a regular basis for several reasons:
To recover disk space occupied by updated or deleted rows.
To update data statistics used by the PostgreSQL query planner.
To protect against loss of very old data due to transaction ID wraparound.
But using MySQL database we don't have to do any of the above. Simply we don't have to do any maintenance on a MySQL database.
My problems are,
- Why is that we don't have to do any maintenance on a MySQL database?
- Is there a way to carry out maintenance on a MySQL database?
Given that I'm looking for a technical answer. As an example "database backup" is not the answer I'm looking for therefore below is not acceptable
OPTIMIZE TABLE
? Btw, in postgresql you don't evenVACUUM
explicitly because of autovacuum. – zerkms Feb 28 '14 at 4:13