0

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:

  1. To recover disk space occupied by updated or deleted rows.

  2. To update data statistics used by the PostgreSQL query planner.

  3. To protect against loss of very old data due to transaction ID wraparound.

Read more

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,

  1. Why is that we don't have to do any maintenance on a MySQL database?
  2. 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

https://stackoverflow.com/questions/7478849/general-mysql-database-maintenance-advice

5
  • 1
    OPTIMIZE TABLE? Btw, in postgresql you don't even VACUUM explicitly because of autovacuum.
    – zerkms
    Feb 28 '14 at 4:13
  • Your question seems to be looking for some general idea of maintenance which this answer seems to carry just fine, General Mysql database maintenance advice
    – Prix
    Feb 28 '14 at 4:15
  • It's not only VACUUM, There are tons of way to get the maintenance work done.
    – Techie
    Feb 28 '14 at 4:16
  • 5
    You're reading the 8.1 documentation. Try reading documentation for a less pre-historic version, where it will discuss autovacuum. Feb 28 '14 at 5:07
  • Running vacuum manually should not be needed on any recent Postgres version - it's definitely not something where you need to have a job running to do it. Simply configuring autovacuum should cover most use-cases (but I do agree: the whole vacuum thing is maybe the only thing I don't really like about Postgres - but in most of the cases it isn't really a problem at all) Mar 3 '14 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.