首页 > mysql数据表数量的上限是多少

mysql数据表数量的上限是多少

一个数据库中的数据表有数量上限吗?如果有,是多少呢?如果我想做一个服务,给其它用户提供paas,允许用户自由创建数据表,那么会不会有性能上的限制。比如一台服务器打开的数据库文件太多会造成明显的性能下降。


http://dev.mysql.com/doc/refman/5.7/en/database-count-limit.html

MySQL has no limit on the number of tables. The underlying file system may have a limit on the number of files that represent tables. Individual storage engines may impose engine-specific constraints. InnoDB permits up to 4 billion tables.


  1. 应该是有上限的,为UNSIGNED INTEGER42亿多。
  2. 文件系统支持同时打开的文件数是非常有限的,一般在K级别。
  3. 在表数到达理论上限之前很多,这个世界上就没有机器能支撑这么多表了。
  4. 建议一个用户一个库,这样方便分布式部署和迁移。
  5. 如果自己业务需要的话,有一个09年的数据,MySQL 50万张表,对性能没有明显影响,单表查询时间0.3s左右。
【热门文章】
【热门文章】