tags:

views:

81

answers:

1

What is the maximum number of tables that MySQL can handle?

Thanks in advance.

John

+6  A: 

The fact that you are asking this question is probably an indicator that you are not taking a best practice approach to your problem.

You may want to explain why you need to create many tables, in order to see if you will receive better suggestions on how to tackle this issue.

However, there are no server limits on the number of tables in a MySQL database, but since each MyISAM table has associated files, then any OS limits on the number of files allowed will have an effect. InnoDB tables, indexes, etc, are stored in a single tablespace, with a maximum of two billion tables. (Source)

Daniel Vassallo
What is MyISAM?
John
MyISAM is the default storage engine for MySQL. Your tables are probably using MyISAM unless you explicitly stated to use InnoDB. Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to indicate the file type. An .frm file stores the table format. The data file has an .MYD extension. The index file has an .MYI extension. Further info: http://dev.mysql.com/doc/refman/5.0/en/myisam-storage-engine.html, http://en.wikipedia.org/wiki/MyISAM.
Daniel Vassallo