Our main database (MySQL) has about 50 tables with about 2 million records each, many of the columns are indexed. Before doing any major change, we either copy the entire DB under a new name like "DB_MAIN_Nov112018" and just leave it there as an online backup/copy or we copy individual tables and use the same principle. Does this hurt the performance of the database server as it has to do the indexing of the original DB as well as the many tables and databases that are used as backups?
-
Do you ask copying hurts performance or doing back up ?– igelrCommented Nov 13, 2018 at 6:47
-
The question is a little strange... Any (absolutely any!) additional operation (ever not DBServer-related) decreases performance.– AkinaCommented Nov 13, 2018 at 7:21
-
1Use mysqldump to create backups rather than making copies of the databases on the running server. If you need to restore things it's easy and quick to use the backups that you created.– DaveCommented Nov 13, 2018 at 12:54
Add a comment
|
1 Answer
As long as the database and its tables and many indexes are just sitting there, there is essentially no harm:
- The extra db and tables have no impact on your ordinary queries.
- Some meta operation involving the
information_schema
will notice them. - The copy takes disk space. (So would a dump.)
An advantage over a dump: You can quickly perform a query on the old copy.