What is the maximum number of tables you can have in a single DB ?

I cannot find a definitive answer on this. I am dealing with a rapidly growing WordPress MU install (horrible DB design) running on MySQL 5 and RHEL 5. How many tables can fit in a single DB before there will be some issues?

Opening a table has some overhead. For MyISAM, watch the table_cache, for InnoDB, it’s all part of the buffer pool.

It has more to do with the underlying OS/filesystem than it does with MySQL - hence why you can’t find an answer :wink:

If you need a number (Linux): ~50 000.

You won’t get that number on a small ec2 instance, but if you’ve got a little bit of memory it should work. You will need to raise the table_cache quite high, and you’ll sink a lot of lost memory lost in InnoDB data dictionary.