MySQL 3.22 limits the table size to 4GB. Since the MyISAM storage engine was used in MySQL 3.23, the maximum table size was increased to 65536TB (2567 – 1 bytes). Due to the larger table size allowed, the maximum valid table size for MySQL database is usually determined by the operating system's limit on file size, rather than the MySQL internal limit.
The InnoDB storage engine saves the InnoDB table in a table space, which can be created by several files. In this way, the size of the table can exceed the maximum capacity of the individual file. Table spaces can include raw disk partitions, making large tables possible. The maximum capacity of a tablespace is 64TB.
In the table below, some examples of operating system file size limits are listed. This is only a preliminary guide and is not final. For the latest information, refer to the documentation for the operating system.
Operating system |
File Size Limits |
Linux 2.2-intel 32-bit |
2GB (LFS:4GB) |
Linux 2.4+ |
(using ext3 filesystem) 4TB |
Solaris 9/10 |
16TB |
NetWare W/NSS FileSystem |
8TB |
Win32 W/fat/fat32 |
2gb/4gb |
Win32 W/ntfs |
2TB (possibly larger) |
MacOS X w/hfs+ |
2TB |
Under the Linux 2.2 platform, more than 2GB of MyISAM tables can be obtained by using a large file support (LFS) patch on the ext2 file system. Under the Linux 2.4 platform, there are patches for reiserfs that can support large files (up to 2TB). Most of the Linux versions currently released are based on the 2.4 kernel, which contains all the required LFS patches. Using JFS and Xfs,petabyte (gigabit) and larger files can also be implemented on Linux. However, the maximum available file size still depends on a number of factors, one of which is the file system used to store the MySQL table.
MYSQL Table Size limit