Mysql – Does having many databases affect MySQL performance

MySQLperformance

I have huge unused databases in MySQL. Do they affect my MySQL engine performance even if they are unused? Do they consume memory on their own?

Thanks

Best Answer

The only performance hit I can see is on the INFORMATION_SCHEMA database (See my post How is INFORMATION_SCHEMA implemented in MySQL?)

If you have queries that poll for the existence of tables, gets the table sizes (Example: See my post MySQL Workbench Database Sizes), and things of this nature, MySQL will spend time sifting through the OS for such metadata. Getting metadata on InnoDB tables and partitioned MyISAM tables will make the INFORMATION_SCHEMA take the worst hit as it must open many file handles.

Other than that, you regular queries on your working dataset should be fine.